Added macrons to regex

This commit is contained in:
sergiusz 2021-01-06 01:54:53 +01:00
parent c59eb00138
commit 5a0064827e
4 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
Nīlus <span>fluvi<input type="text" data-expected="us"/></span> est. Nīlus et Rhēnus <span>fluvi<input type="text" data-expected="ī"/></span> <span><input type="text" data-expected="sunt"/>.</span> Crēta <span>īnsul<input type="text" data-expected="a"/></span> <span><input type="text" data-expected="est"/>.</span> Crēta et Rhodus <span>īnsul<input type="text" data-expected="ae"/></span> sunt. Brundisium <span>oppid<input type="text" data-expected="um"/></span> <span><input type="text" data-expected="est"/>.</span> Brundisium et Tūsculum <span>oppid<input type="text" data-expected="a"/></span> <span><input type="text" data-expected="sunt"/>.</span><br> Nīlus <span>fluvi<input type="text" data-expected="us"/></span> est. Nīlus et Rhēnus <span>fluvi<input type="text" data-expected="ī"/></span> <span><input type="text" data-expected="sunt"/>.</span> Crēta <span>īnsul<input type="text" data-expected="a"/></span> <span><input type="text" data-expected="est"/>.</span> Crēta et Rhodus <span>īnsul<input type="text" data-expected="ae"/></span> sunt. Brundisium <span>oppid<input type="text" data-expected="um"/></span> <span><input type="text" data-expected="est"/>.</span> Brundisium et Tūsculum <span>oppid<input type="text" data-expected="a"/></span> <span><input type="text" data-expected="sunt"/>.</span><br>
Rhēnus <span>fluvi<input type="text" data-expected="us"/></span> <span>magn<input type="text" data-expected="us"/></span> est. Tiberis est <span>fluvi<input type="text" data-expected="us"/></span> <span>parv<input type="text" data-expected="us"/>.</span> Rhēnus et Dānuvius nōn fluvi_ī_ parv_ī_, sed fluvi_ī_ magn_ī_ sunt. Sardinia ī<span>nsul<input type="text" data-expected="a"/></span> <span>magn<input type="text" data-expected="a"/></span> est. Melita ī<span>nsul<input type="text" data-expected="a"/></span> <span>parv<input type="text" data-expected="a"/></span> est. Sardinia et Sicilia nōn ī<span>nsul<input type="text" data-expected="ae"/></span> <span>parv<input type="text" data-expected="ae"/>,</span> sed ī<span>nsul<input type="text" data-expected="ae"/></span> <span>magn<input type="text" data-expected="ae"/></span> sunt. Brundisium nōn <span>oppid<input type="text" data-expected="um"/></span> <span>parv<input type="text" data-expected="um"/>,</span> sed <span>oppid<input type="text" data-expected="um"/></span> <span>magn<input type="text" data-expected="um"/></span> est. Tūsculum et Delphī non <span>oppid<input type="text" data-expected="a"/></span> <span>magn<input type="text" data-expected="a"/>,</span> sed <span>oppid<input type="text" data-expected="a"/></span> <span>parv<input type="text" data-expected="a"/></span> sunt.<br> Rhēnus <span>fluvi<input type="text" data-expected="us"/></span> <span>magn<input type="text" data-expected="us"/></span> est. Tiberis est <span>fluvi<input type="text" data-expected="us"/></span> <span>parv<input type="text" data-expected="us"/>.</span> Rhēnus et Dānuvius nōn <span>fluvi<input type="text" data-expected="ī"/></span> <span>parv<input type="text" data-expected="ī"/>,</span> sed <span>fluvi<input type="text" data-expected="ī"/></span> <span>magn<input type="text" data-expected="ī"/></span> sunt. Sardinia ī<span>nsul<input type="text" data-expected="a"/></span> <span>magn<input type="text" data-expected="a"/></span> est. Melita ī<span>nsul<input type="text" data-expected="a"/></span> <span>parv<input type="text" data-expected="a"/></span> est. Sardinia et Sicilia nōn ī<span>nsul<input type="text" data-expected="ae"/></span> <span>parv<input type="text" data-expected="ae"/>,</span> sed ī<span>nsul<input type="text" data-expected="ae"/></span> <span>magn<input type="text" data-expected="ae"/></span> sunt. Brundisium nōn <span>oppid<input type="text" data-expected="um"/></span> <span>parv<input type="text" data-expected="um"/>,</span> sed <span>oppid<input type="text" data-expected="um"/></span> <span>magn<input type="text" data-expected="um"/></span> est. Tūsculum et Delphī non <span>oppid<input type="text" data-expected="a"/></span> <span>magn<input type="text" data-expected="a"/>,</span> sed <span>oppid<input type="text" data-expected="a"/></span> <span>parv<input type="text" data-expected="a"/></span> sunt.<br>
Crēta ī<span>nsul<input type="text" data-expected="a"/></span> <span>Graec<input type="text" data-expected="a"/></span> est. Lesbos et Chios et Naxus sunt ī<span>nsul<input type="text" data-expected="ae"/></span> <span>Graec<input type="text" data-expected="ae"/>.</span> In Graeciā <span>mult<input type="text" data-expected="ae"/></span> ī<span>nsul<input type="text" data-expected="ae"/></span> sunt. In Galliaa sunt mult_ī_ fluvi_ī_. In Italiā <span>mult<input type="text" data-expected="a"/></span> <span>oppid<input type="text" data-expected="a"/></span> sunt. In Arabiā sunt pauc_ī_ fluvi_ī_ et <span>pauc<input type="text" data-expected="a"/></span> <span>oppid<input type="text" data-expected="a"/>.</span><br> Crēta ī<span>nsul<input type="text" data-expected="a"/></span> <span>Graec<input type="text" data-expected="a"/></span> est. Lesbos et Chios et Naxus sunt ī<span>nsul<input type="text" data-expected="ae"/></span> <span>Graec<input type="text" data-expected="ae"/>.</span> In Graeciā <span>mult<input type="text" data-expected="ae"/></span> ī<span>nsul<input type="text" data-expected="ae"/></span> sunt. In Galliaa sunt <span>mult<input type="text" data-expected="ī"/></span> <span>fluvi<input type="text" data-expected="ī"/>.</span> In Italiā <span>mult<input type="text" data-expected="a"/></span> <span>oppid<input type="text" data-expected="a"/></span> sunt. In Arabiā sunt <span>pauc<input type="text" data-expected="ī"/></span> <span>fluvi<input type="text" data-expected="ī"/></span> et <span>pauc<input type="text" data-expected="a"/></span> <span>oppid<input type="text" data-expected="a"/>.</span><br>
A et B <span>litter<input type="text" data-expected="ae"/></span> Latī<span>n<input type="text" data-expected="ae"/></span> sunt. C quoque <span>litter<input type="text" data-expected="a"/></span> Latī<span>n<input type="text" data-expected="a"/></span> est. Multī et paucī vocā<span>bul<input type="text" data-expected="a"/></span> Latī<span>n<input type="text" data-expected="a"/></span> sunt. Ubi quoque vocā<span>bul<input type="text" data-expected="um"/></span> Latī<span>n<input type="text" data-expected="um"/></span> est. I et II <span>numer<input type="text" data-expected="i"/></span> Rōmā<span>n<input type="text" data-expected="i"/></span> sunt. III quoque <span>numer<input type="text" data-expected="us"/></span> Rōmā<span>n<input type="text" data-expected="us"/></span> est. A et B <span>litter<input type="text" data-expected="ae"/></span> Latī<span>n<input type="text" data-expected="ae"/></span> sunt. C quoque <span>litter<input type="text" data-expected="a"/></span> Latī<span>n<input type="text" data-expected="a"/></span> est. Multī et paucī vocā<span>bul<input type="text" data-expected="a"/></span> Latī<span>n<input type="text" data-expected="a"/></span> sunt. Ubi quoque vocā<span>bul<input type="text" data-expected="um"/></span> Latī<span>n<input type="text" data-expected="um"/></span> est. I et II <span>numer<input type="text" data-expected="i"/></span> Rōmā<span>n<input type="text" data-expected="i"/></span> sunt. III quoque <span>numer<input type="text" data-expected="us"/></span> Rōmā<span>n<input type="text" data-expected="us"/></span> est.

View File

@ -1,2 +1,2 @@
Sicilia _īnsula_ est. Italia īnsula _nōn_ est. Rhēnus <span><input type="text" data-expected="fluvius"/></span> est. Brundisium <span><input type="text" data-expected="oppidum"/></span> est. Sicilia et Sardinia _īnsulae_ magnae sunt. Melita īnsula <span><input type="text" data-expected="parva"/></span> est. Britannia nōn _īnsula_ parva, sed _īnsula_ <span><input type="text" data-expected="magna"/></span> est. Brundisium nōn <span><input type="text" data-expected="oppidum"/></span> <span><input type="text" data-expected="parvum"/>,</span> sed <span><input type="text" data-expected="oppidum"/></span> magnum est. <span>Est<input type="text" data-expected="ne"/></span> Brundisium in Graeciā? Brundisium _nōn_ est in Graeciā, <span><input type="text" data-expected="sed"/></span> in Italiā. <span><input type="text" data-expected="Ubi"/></span> est Sparta? Sparta est in Graeciā. Sparta oppidum <span><input type="text" data-expected="Graecum"/></span> est. Delphī <span><input type="text" data-expected="quoque"/></span> oppidum Graecum est. Euboea, Naxus, Lesbos, Chios _īnsulae_ Graecae sunt. In Graeciā sunt <span><input type="text" data-expected="multae"/></span> īnsulae. Sicilia <span><input type="text" data-expected="īnsula"/></span> est. Italia īnsula <span><input type="text" data-expected="nōn"/></span> est. Rhēnus <span><input type="text" data-expected="fluvius"/></span> est. Brundisium <span><input type="text" data-expected="oppidum"/></span> est. Sicilia et Sardinia <span><input type="text" data-expected="īnsulae"/></span> magnae sunt. Melita īnsula <span><input type="text" data-expected="parva"/></span> est. Britannia nōn <span><input type="text" data-expected="īnsula"/></span> parva, sed <span><input type="text" data-expected="īnsula"/></span> <span><input type="text" data-expected="magna"/></span> est. Brundisium nōn <span><input type="text" data-expected="oppidum"/></span> <span><input type="text" data-expected="parvum"/>,</span> sed <span><input type="text" data-expected="oppidum"/></span> magnum est. <span>Est<input type="text" data-expected="ne"/></span> Brundisium in Graeciā? Brundisium <span><input type="text" data-expected="nōn"/></span> est in Graeciā, <span><input type="text" data-expected="sed"/></span> in Italiā. <span><input type="text" data-expected="Ubi"/></span> est Sparta? Sparta est in Graeciā. Sparta oppidum <span><input type="text" data-expected="Graecum"/></span> est. Delphī <span><input type="text" data-expected="quoque"/></span> oppidum Graecum est. Euboea, Naxus, Lesbos, Chios <span><input type="text" data-expected="īnsulae"/></span> Graecae sunt. In Graeciā sunt <span><input type="text" data-expected="multae"/></span> īnsulae.
Quid est III? III <span><input type="text" data-expected="numerus"/></span> est. Quid est A? A littera est. A, B, C <span><input type="text" data-expected="litterae"/></span> Latīnae sunt. <span><input type="text" data-expected="Num"/></span> Γ littera Latīna est? Γ _nōn_ littera _Latīna_, sed littera <span><input type="text" data-expected="Graeca"/></span> est. Īnsula <span><input type="text" data-expected="vocabulum"/></span> Latinum est. Quid est III? III <span><input type="text" data-expected="numerus"/></span> est. Quid est A? A littera est. A, B, C <span><input type="text" data-expected="litterae"/></span> Latīnae sunt. <span><input type="text" data-expected="Num"/></span> Γ littera Latīna est? Γ <span><input type="text" data-expected="nōn"/></span> littera <span><input type="text" data-expected="Latīna"/>,</span> sed littera <span><input type="text" data-expected="Graeca"/></span> est. Īnsula <span><input type="text" data-expected="vocabulum"/></span> Latinum est.

View File

@ -1,3 +1,3 @@
Mārcus fī<span>li<input type="text" data-expected="us"/></span> Iūliī est. Iūlia fī<span>li<input type="text" data-expected="a"/></span> Iūliī est. Iūlius est vir Rōmā<span>n<input type="text" data-expected="us"/>.</span> Aemilia fē<span>min<input type="text" data-expected="a"/></span> Rōmā<span>n<input type="text" data-expected="a"/></span> est. Iūlius <span>domin<input type="text" data-expected="us"/>,</span> Aemilia <span>domin<input type="text" data-expected="a"/></span> est. Mēdus <span>serv<input type="text" data-expected="us"/></span> <span>Graec<input type="text" data-expected="us"/></span> est, Dēlia est <span>ancill<input type="text" data-expected="a"/></span> <span>Graec<input type="text" data-expected="a"/>.</span> Sparta <span>oppid<input type="text" data-expected="um"/></span> <span>Graec<input type="text" data-expected="um"/></span> est. Mārcus fī<span>li<input type="text" data-expected="us"/></span> Iūliī est. Iūlia fī<span>li<input type="text" data-expected="a"/></span> Iūliī est. Iūlius est vir Rōmā<span>n<input type="text" data-expected="us"/>.</span> Aemilia fē<span>min<input type="text" data-expected="a"/></span> Rōmā<span>n<input type="text" data-expected="a"/></span> est. Iūlius <span>domin<input type="text" data-expected="us"/>,</span> Aemilia <span>domin<input type="text" data-expected="a"/></span> est. Mēdus <span>serv<input type="text" data-expected="us"/></span> <span>Graec<input type="text" data-expected="us"/></span> est, Dēlia est <span>ancill<input type="text" data-expected="a"/></span> <span>Graec<input type="text" data-expected="a"/>.</span> Sparta <span>oppid<input type="text" data-expected="um"/></span> <span>Graec<input type="text" data-expected="um"/></span> est.
Iūlius pater Mā<span>rc<input type="text" data-expected="i"/></span> est. Mārcus est fīlius Iūli_ī_ et <span>Aemili<input type="text" data-expected="ae"/>.</span> Mēdus servus Iūli_ī_ est: Iūlius est dominus <span>serv<input type="text" data-expected="i"/>.</span> Iūlius dominus Mē<span>d<input type="text" data-expected="i"/></span> et Dā<span>v<input type="text" data-expected="i"/></span> est: Iūlius dominus <span>serv<input type="text" data-expected="orum"/></span> est. Numerus <span>serv<input type="text" data-expected="orum"/></span> magnus est. Dēlia est ancilla <span>Aemili<input type="text" data-expected="ae"/></span>: Aemilia domina <span>ancill<input type="text" data-expected="ae"/></span> est. Aemilia domina Dē<span>li<input type="text" data-expected="ae"/></span> et <span>Syr<input type="text" data-expected="ae"/></span> est: Aemilia domina <span>ancill<input type="text" data-expected="arum"/></span> est. In familiā Iūli_ī_ est magnus numerus <span>serv<input type="text" data-expected="orum"/></span> et <span>ancill<input type="text" data-expected="arum"/>.</span> Aemilia māter Marc_ī_ et Qūint_ī_ et Iū<span>li<input type="text" data-expected="ae"/></span> est. Mārcus, Quīntus Iūliaque sunt līberī Iūli_ī_ et <span>Aemili<input type="text" data-expected="ae"/>.</span> Numerus lī<span>ber<input type="text" data-expected="orum"/></span> est trēs. Numerus <span>serv<input type="text" data-expected="orum"/></span> est centum. Iūlius pater Mā<span>rc<input type="text" data-expected="i"/></span> est. Mārcus est fīlius Iū<span>li<input type="text" data-expected="ī"/></span> et <span>Aemili<input type="text" data-expected="ae"/>.</span> Mēdus servus Iū<span>li<input type="text" data-expected="ī"/></span> est: Iūlius est dominus <span>serv<input type="text" data-expected="i"/>.</span> Iūlius dominus Mē<span>d<input type="text" data-expected="i"/></span> et Dā<span>v<input type="text" data-expected="i"/></span> est: Iūlius dominus <span>serv<input type="text" data-expected="orum"/></span> est. Numerus <span>serv<input type="text" data-expected="orum"/></span> magnus est. Dēlia est ancilla <span>Aemili<input type="text" data-expected="ae"/></span>: Aemilia domina <span>ancill<input type="text" data-expected="ae"/></span> est. Aemilia domina Dē<span>li<input type="text" data-expected="ae"/></span> et <span>Syr<input type="text" data-expected="ae"/></span> est: Aemilia domina <span>ancill<input type="text" data-expected="arum"/></span> est. In familiā Iū<span>li<input type="text" data-expected="ī"/></span> est magnus numerus <span>serv<input type="text" data-expected="orum"/></span> et <span>ancill<input type="text" data-expected="arum"/>.</span> Aemilia māter <span>Marc<input type="text" data-expected="ī"/></span> et Qū<span>int<input type="text" data-expected="ī"/></span> et Iū<span>li<input type="text" data-expected="ae"/></span> est. Mārcus, Quīntus Iūliaque sunt līberī Iū<span>li<input type="text" data-expected="ī"/></span> et <span>Aemili<input type="text" data-expected="ae"/>.</span> Numerus lī<span>ber<input type="text" data-expected="orum"/></span> est trēs. Numerus <span>serv<input type="text" data-expected="orum"/></span> est centum.
In pāginā prīmā <span>capitul<input type="text" data-expected="i"/></span> <span>secund<input type="text" data-expected="i"/></span> multa vocābula nova sunt. Numerus <span>capitul<input type="text" data-expected="orum"/></span> nōn parvus est. In pāginā prīmā <span>capitul<input type="text" data-expected="i"/></span> <span>secund<input type="text" data-expected="i"/></span> multa vocābula nova sunt. Numerus <span>capitul<input type="text" data-expected="orum"/></span> nōn parvus est.

View File

@ -10,7 +10,7 @@ for filename in sys.argv[1:]:
html_input_head = '<input type="text" data-expected="' html_input_head = '<input type="text" data-expected="'
html_input_tail = '"/>' html_input_tail = '"/>'
html_span_tail = '</span>' html_span_tail = '</span>'
content = re.sub(r'(\s|\"|)([a-zA-Z\-\ÿ]+|)_([a-zA-Z\-]+)_(\.|\,|)', r'\1' + html_span_head + r'\2' + html_input_head + r'\3' + html_input_tail + r'\4' + html_span_tail, content) content = re.sub(r'(\s|\"|)([a-zA-Z\-\ÿ]+|)_([āēīōūa-zA-Z\-]+)_(\.|\,|)', r'\1' + html_span_head + r'\2' + html_input_head + r'\3' + html_input_tail + r'\4' + html_span_tail, content)
# Replace vowel-dash-vowel with vowels with macrons # Replace vowel-dash-vowel with vowels with macrons
content = content.replace('A-A', 'Ā') content = content.replace('A-A', 'Ā')