Skip to content
Snippets Groups Projects
Commit 99dd713c authored by Simon Will's avatar Simon Will
Browse files

Treat qu as one consonant when getting syllables

parent d4793dc9
No related branches found
No related tags found
No related merge requests found
......@@ -170,9 +170,9 @@ def get_syllables_for_token(token: Token):
syllables = []
if token.accented:
regex = (
r'((?:ua|ue|ae|oe|au|eu|yi|[aeiouy])[_^]?)'
r'((?<!q)(?:ua|ue|ae|oe|au|eu|yi|[aeiouy])[_^]?)'
if token.text[0].isupper()
else r'((?:ua|ue|ae|oe|au|[aeiouy])[_^]?)'
else r'((?<!q)(?:ua|ue|ae|oe|au|[aeiouy])[_^]?)'
)
accented = (token.accented + token.clitic
if token.clitic
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment