diff --git a/greek_normalisation/utils.py b/greek_normalisation/utils.py index 7247c92..87b032e 100644 --- a/greek_normalisation/utils.py +++ b/greek_normalisation/utils.py @@ -8,6 +8,8 @@ PSILI = "\u0313" DASIA = "\u0314" +DIAERESIS = "\u0308" + BREATHING = [PSILI, DASIA] ACCENTS = [VARIA, OXIA, PERISPOMENI] @@ -69,7 +71,10 @@ def breathing_check(word): if len(d) > 1: if d[1] in BREATHING: if len(d) > 2 and d[2] in "ιυ": - return False + if len(d) > 3 and d[3] == DIAERESIS: + return True + else: + return False else: return True elif d[1] in "ιυ": diff --git a/tests.rst b/tests.rst index 86c6cec..e1d06b5 100644 --- a/tests.rst +++ b/tests.rst @@ -61,6 +61,9 @@ False >>> breathing_check('ἀι') False +>>> breathing_check('ἀϊ') +True + >>> breathing_check('ἀε') True