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

Slightly simplify muta_cum_liquida function

parent 4edbd904
No related branches found
No related tags found
No related merge requests found
......@@ -432,17 +432,19 @@ def muta_cum_liquida(verse):
r'[aeiouvy](([bpsckgdt]|(qu)|(qv))[h\W]*[lrmn])([aeiouvy]|[.?!]|$)',
flags=re.IGNORECASE
)
if re.search(mcl_regex, verse.text):
matches = re.finditer(mcl_regex, verse.text)
for match in matches:
for reading in verse.readings:
for token in reading.tokens:
for syllable in token.syllables:
for match in re.finditer(mcl_regex, verse.text):
for reading in verse.readings:
for token in reading.tokens:
break_ = False
for syllable in token.syllables:
if syllable.span[0] <= match.start() < syllable.span[1]:
mcl = Phenomenon(chars=match.group(1))
syllable.phenomena['muta cum liquida'] = mcl
if syllable.span[0] <= match.start() < syllable.span[1]:
mcl = Phenomenon(chars=match.group(1))
syllable.phenomena['muta cum liquida'] = mcl
break_ = True
break
if break_:
break
def positional_lengthening(verse):
......
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