Skip to content

Commit ef469fc

Browse files
committed
Fix accented word cannot be separated correctly
1 parent b71a00e commit ef469fc

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/ainconv/conversion/latin.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
VOWELS = "aeiou"
2-
CONSONANTS = "ptckmnshwry’"
3-
4-
from unicodedata import normalize
5-
61
ACCENTED_VOWELS = {
72
"á": "a",
83
"é": "e",
@@ -11,6 +6,11 @@
116
"ú": "u",
127
}
138

9+
VOWELS = "aeiouáéíóúâêîôûāēīōū"
10+
CONSONANTS = "ptckmnshwry’"
11+
12+
from unicodedata import normalize
13+
1414

1515
def clean(text: str) -> str:
1616
"""Clean up Latin script.

tests/test_syllable.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
"ka",
1919
"re",
2020
],
21+
"tané": ["ta", "né"],
22+
"ônâ": ["ô", "nâ"],
2123
}
2224

2325

0 commit comments

Comments
 (0)