Skip to content

Commit

Permalink
test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean-Baptiste-Camps committed Dec 10, 2024
1 parent badb1cc commit a9ad3eb
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tests/test_load_corpus.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,9 +585,21 @@ def test_normalise(self):
# WHEN
results = superstyl.preproc.pipe.normalise(text, keep_sym=True)
# THEN
expected_keepsym = "Hello, Mr. 𓀁, how are §§ you; doing? ſõ ❡"
expected_keepsym = "Hello, Mr. 𓀁, how are §§ you; doing? ſ\uf217õ ❡"
self.assertEqual(results, expected_keepsym)

# SCENARIO
# GIVEN
text = 'Coucou 😅'
# WHEN
results = superstyl.preproc.pipe.normalise(text, keep_sym=True)
# THEN
expected_keepsym = 'Coucou 😅'
self.assertEqual(results, expected_keepsym)
# NOTE: careful with combining smileys: normalise("Coucou 😵‍💫", keep_sym=True)
# gives: 'Coucou 😵 💫'
# because of the way NFC normalisation is handled probably

def test_detect_lang(self):
french = "Bonjour, Monsieur, comment allez-vous?"
# NB: it fails on that !!!
Expand Down

0 comments on commit a9ad3eb

Please sign in to comment.