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

Allow punctuation between positional lengths

parent 6db95753
No related branches found
No related tags found
No related merge requests found
......@@ -262,7 +262,7 @@ def get_syllables(reading):
def muta_cum_liquida(verse):
mcl_regex = re.compile(r'[aeiouv](([bpsckgdt]|(qu)|(qv)),?\s?[lrmn])([aeiouv]|[.?!]|$)', flags=re.IGNORECASE)
mcl_regex = re.compile(r'[aeiouv](([bpsckgdt]|(qu)|(qv))[,.!?]?\s?[lrmn])([aeiouv]|[.?!]|$)', flags=re.IGNORECASE)
if re.search(mcl_regex, verse.text):
matches = re.finditer(mcl_regex, verse.text)
......@@ -277,7 +277,7 @@ def muta_cum_liquida(verse):
def positional_lengthening(verse):
pl_regex = re.compile(r'[aeiouv](((([bcdfgjklmnprstvwxz]|(qu)),?\s?){2,})|[xz])', flags=re.IGNORECASE)
pl_regex = re.compile(r'[aeiouv](((([bcdfgjklmnprstvwxz]|(qu))[,.!?]?\s?){2,})|[xz])', flags=re.IGNORECASE)
if re.search(pl_regex, verse.text):
matches = re.finditer(pl_regex, verse.text)
......
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