Skip to content

Commit

Permalink
It is possible to have two abbr two ex in the same expan
Browse files Browse the repository at this point in the history
Fixed #6
Fixed it by removing glued </expan><expan> which would mean there is a tail to an expansion
  • Loading branch information
PonteIneptique committed Nov 2, 2017
1 parent 0a2cac6 commit a3af949
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion chetc/configs/clauss.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,10 @@ def replacements(self):
##########################################
# Clean Up
##########################################
("(<abbr></abbr>)", "")
("(<abbr></abbr>)", ""),

# If two expan are glued, it means they are from the same group...
("(</expan><expan>)", "")

]
for pattern, replacement in x:
Expand Down
4 changes: 2 additions & 2 deletions tests/test_Clauss_now.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
CIL 4 60 -- http://arachne.uni-koeln.de/item/buchseite/554886
C(aio) Iulio Caesare dict(atore) iter(um) / M(arco) Antonio mag(istro) eq(uitum) / mag(istri) vici et compiti / M(arcus) Blattius M(arci) f(ilius) / M(arcus) Cerrinius M(arci) f(ilius) / M(arcus) Sepullius [3] / [6] / Q(uintus) Pra[3] / C(aius) Corne[lius 3] / [6] / P(ublius) Ro[c]ius [3]s / Salvius E[3]ro() M(arci) s(ervus) // C(aio) Caes]are M(arco) Lepido co(n)s(ulibus) / [3] Blattius M(arci) f(ilius) / C(aius) [H]ermatorius(?) P(ubli) f(ilius) / M(arcus) [3]ius M(arci) f(ilius?) Plutus / M(arcus) Stronnius M(arci) l(ibertus) Nic[3]o / M(arcus) Oppius S(exti) l(ibertus) Aes[chines(?)] C(aius) Cepidius C(ai) [l(ibertus)
<lb n="1"/><expan><abbr>C</abbr><ex>aio</ex></expan> Iulio Caesare <expan><abbr>dict</abbr><ex>atore</ex></expan> <expan><abbr>iter</abbr><ex>um</ex></expan> <lb n="2"/> <expan><abbr>M</abbr><ex>arco</ex></expan> Antonio <expan><abbr>mag</abbr><ex>istro</ex></expan> <expan><abbr>eq</abbr><ex>uitum</ex></expan> <lb n="3"/> <expan><abbr>mag</abbr><ex>istri</ex></expan> vici et compiti <lb n="4"/> <expan><abbr>M</abbr><ex>arcus</ex></expan> Blattius <expan><abbr>M</abbr><ex>arci</ex></expan> <expan><abbr>f</abbr><ex>ilius</ex></expan> <lb n="5"/> <expan><abbr>M</abbr><ex>arcus</ex></expan> Cerrinius <expan><abbr>M</abbr><ex>arci</ex></expan> <expan><abbr>f</abbr><ex>ilius</ex></expan> <lb n="6"/> <expan><abbr>M</abbr><ex>arcus</ex></expan> Sepullius <gap reason="lost" extent="3" unit="character"/> <lb n="7"/> <gap reason="lost" extent="6" unit="character"/> <lb n="8"/> <expan><abbr>Q</abbr><ex>uintus</ex></expan> Pra<gap reason="lost" extent="3" unit="character"/> <lb n="9"/> <expan><abbr>C</abbr><ex>aius</ex></expan> Corne<supplied reason="lost">lius</supplied> <gap reason="lost" extent="3" unit="character"/> <lb n="10"/> <gap reason="lost" extent="6" unit="character"/> <lb n="11"/> <expan><abbr>P</abbr><ex>ublius</ex></expan> Ro<supplied reason="lost">c</supplied>ius <gap reason="lost" extent="3" unit="character"/>s <lb n="12"/> Salvius <expan><abbr>E<gap reason="lost" extent="3" unit="character"/>ro</abbr></expan> <expan><abbr>M</abbr><ex>arci</ex></expan> <expan><abbr>s</abbr><ex>ervus</ex></expan> <lb n="13"/><gap extent="unknown" reason="lost" unit="line" /> <expan><abbr>C</abbr><ex>aio</ex></expan> Caes]are <expan><abbr>M</abbr><ex>arco</ex></expan> Lepido <expan><abbr>co</abbr><ex>n</ex><abbr>s</abbr></expan><expan><ex>ulibus</ex></expan> <lb n="14"/> <gap reason="lost" extent="3" unit="character"/> Blattius <expan><abbr>M</abbr><ex>arci</ex></expan> <expan><abbr>f</abbr><ex>ilius</ex></expan> <lb n="15"/> <expan><abbr>C</abbr><ex>aius</ex></expan> <supplied reason="lost" cert="low">H</supplied>ermatorius <expan><abbr>P</abbr><ex>ubli</ex></expan> <expan><abbr>f</abbr><ex>ilius</ex></expan> <lb n="16"/> <expan><abbr>M</abbr><ex>arcus</ex></expan> <gap reason="lost" extent="3" unit="character"/>ius <expan><abbr>M</abbr><ex>arci</ex></expan> <expan><abbr>f</abbr><ex cert="low">ilius</ex></expan> Plutus <lb n="17"/> <expan><abbr>M</abbr><ex>arcus</ex></expan> Stronnius <expan><abbr>M</abbr><ex>arci</ex></expan> <expan><abbr>l</abbr><ex>ibertus</ex></expan> Nic<gap reason="lost" extent="3" unit="character"/>o <lb n="18"/> <expan><abbr>M</abbr><ex>arcus</ex></expan> Oppius <expan><abbr>S</abbr><ex>exti</ex></expan> <expan><abbr>l</abbr><ex>ibertus</ex></expan> Aes<supplied reason="lost" cert="low">chines</supplied> <expan><abbr>C</abbr><ex>aius</ex></expan> Cepidius <expan><abbr>C</abbr><ex>ai</ex></expan> <supplied reason="lost"><expan><abbr>l</abbr><ex>ibertus</ex></expan></supplied> <gap reason="lost" extent="unknown" unit="character"/>
<lb n="1"/><expan><abbr>C</abbr><ex>aio</ex></expan> Iulio Caesare <expan><abbr>dict</abbr><ex>atore</ex></expan> <expan><abbr>iter</abbr><ex>um</ex></expan> <lb n="2"/> <expan><abbr>M</abbr><ex>arco</ex></expan> Antonio <expan><abbr>mag</abbr><ex>istro</ex></expan> <expan><abbr>eq</abbr><ex>uitum</ex></expan> <lb n="3"/> <expan><abbr>mag</abbr><ex>istri</ex></expan> vici et compiti <lb n="4"/> <expan><abbr>M</abbr><ex>arcus</ex></expan> Blattius <expan><abbr>M</abbr><ex>arci</ex></expan> <expan><abbr>f</abbr><ex>ilius</ex></expan> <lb n="5"/> <expan><abbr>M</abbr><ex>arcus</ex></expan> Cerrinius <expan><abbr>M</abbr><ex>arci</ex></expan> <expan><abbr>f</abbr><ex>ilius</ex></expan> <lb n="6"/> <expan><abbr>M</abbr><ex>arcus</ex></expan> Sepullius <gap reason="lost" extent="3" unit="character"/> <lb n="7"/> <gap reason="lost" extent="6" unit="character"/> <lb n="8"/> <expan><abbr>Q</abbr><ex>uintus</ex></expan> Pra<gap reason="lost" extent="3" unit="character"/> <lb n="9"/> <expan><abbr>C</abbr><ex>aius</ex></expan> Corne<supplied reason="lost">lius</supplied> <gap reason="lost" extent="3" unit="character"/> <lb n="10"/> <gap reason="lost" extent="6" unit="character"/> <lb n="11"/> <expan><abbr>P</abbr><ex>ublius</ex></expan> Ro<supplied reason="lost">c</supplied>ius <gap reason="lost" extent="3" unit="character"/>s <lb n="12"/> Salvius <expan><abbr>E<gap reason="lost" extent="3" unit="character"/>ro</abbr></expan> <expan><abbr>M</abbr><ex>arci</ex></expan> <expan><abbr>s</abbr><ex>ervus</ex></expan> <lb n="13"/><gap extent="unknown" reason="lost" unit="line" /> <expan><abbr>C</abbr><ex>aio</ex></expan> Caes]are <expan><abbr>M</abbr><ex>arco</ex></expan> Lepido <expan><abbr>co</abbr><ex>n</ex><abbr>s</abbr><ex>ulibus</ex></expan> <lb n="14"/> <gap reason="lost" extent="3" unit="character"/> Blattius <expan><abbr>M</abbr><ex>arci</ex></expan> <expan><abbr>f</abbr><ex>ilius</ex></expan> <lb n="15"/> <expan><abbr>C</abbr><ex>aius</ex></expan> <supplied reason="lost" cert="low">H</supplied>ermatorius <expan><abbr>P</abbr><ex>ubli</ex></expan> <expan><abbr>f</abbr><ex>ilius</ex></expan> <lb n="16"/> <expan><abbr>M</abbr><ex>arcus</ex></expan> <gap reason="lost" extent="3" unit="character"/>ius <expan><abbr>M</abbr><ex>arci</ex></expan> <expan><abbr>f</abbr><ex cert="low">ilius</ex></expan> Plutus <lb n="17"/> <expan><abbr>M</abbr><ex>arcus</ex></expan> Stronnius <expan><abbr>M</abbr><ex>arci</ex></expan> <expan><abbr>l</abbr><ex>ibertus</ex></expan> Nic<gap reason="lost" extent="3" unit="character"/>o <lb n="18"/> <expan><abbr>M</abbr><ex>arcus</ex></expan> Oppius <expan><abbr>S</abbr><ex>exti</ex></expan> <expan><abbr>l</abbr><ex>ibertus</ex></expan> Aes<supplied reason="lost" cert="low">chines</supplied> <expan><abbr>C</abbr><ex>aius</ex></expan> Cepidius <expan><abbr>C</abbr><ex>ai</ex></expan> <supplied reason="lost"><expan><abbr>l</abbr><ex>ibertus</ex></expan></supplied> <gap reason="lost" extent="unknown" unit="character"/>
CIL 04, 00131
Sittium a[e]d(ilem) [o(ro) v(os)] f(aciatis)
<lb n="1"/>Sittium <expan><abbr>a<supplied reason="lost">e</supplied>d</abbr><ex>ilem</ex></expan> <supplied reason="lost"><expan><abbr>o</abbr><ex>ro</ex></expan></supplied> <supplied reason="lost"><expan><abbr>v</abbr><ex>os</ex></expan></supplied> <expan><abbr>f</abbr><ex>aciatis</ex></expan>
http://db.edcs.eu/epigr/edcs_id.php?s_sprache=en&p_edcs_id=EDCS-25800673
[3] Aqutium [3] / d(uum)v(irum) v(irum) [b(onum)]
<lb n="1"/><gap reason="lost" extent="3" unit="character"/> Aqutium <gap reason="lost" extent="3" unit="character"/> <lb n="2"/> <expan><abbr>d</abbr><ex>uum</ex><abbr>v</abbr></expan><expan><ex>irum</ex></expan> <expan><abbr>v</abbr><ex>irum</ex></expan> <supplied reason="lost"><expan><abbr>b</abbr><ex>onum</ex></expan></supplied>
<lb n="1"/><gap reason="lost" extent="3" unit="character"/> Aqutium <gap reason="lost" extent="3" unit="character"/> <lb n="2"/> <expan><abbr>d</abbr><ex>uum</ex><abbr>v</abbr><ex>irum</ex></expan> <expan><abbr>v</abbr><ex>irum</ex></expan> <supplied reason="lost"><expan><abbr>b</abbr><ex>onum</ex></expan></supplied>
2 changes: 1 addition & 1 deletion tests/test_Clauss_wordid.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CIL 4 60 -- http://arachne.uni-koeln.de/item/buchseite/554886
C(aio) Iulio Caesare dict(atore) iter(um) / M(arco) Antonio mag(istro) eq(uitum) / mag(istri) vici et compiti / M(arcus) Blattius M(arci) f(ilius) / M(arcus) Cerrinius M(arci) f(ilius) / M(arcus) Sepullius [3] / [6] / Q(uintus) Pra[3] / C(aius) Corne[lius 3] / [6] / P(ublius) Ro[c]ius [3]s / Salvius E[3]ro() M(arci) s(ervus) // C(aio) Caes]are M(arco) Lepido co(n)s(ulibus) / [3] Blattius M(arci) f(ilius) / C(aius) [H]ermatorius(?) P(ubli) f(ilius) / M(arcus) [3]ius M(arci) f(ilius?) Plutus / M(arcus) Stronnius M(arci) l(ibertus) Nic[3]o / M(arcus) Oppius S(exti) l(ibertus) Aes[chines(?)] C(aius) Cepidius C(ai) [l(ibertus)
<lb n="1"/><w n="1"><expan><abbr>C</abbr><ex>aio</ex></expan></w> <w n="2">Iulio</w> <w n="3">Caesare</w> <w n="4"><expan><abbr>dict</abbr><ex>atore</ex></expan></w> <w n="5"><expan><abbr>iter</abbr><ex>um</ex></expan></w> <lb n="2"/> <w n="6"><expan><abbr>M</abbr><ex>arco</ex></expan></w> <w n="7">Antonio</w> <w n="8"><expan><abbr>mag</abbr><ex>istro</ex></expan></w> <w n="9"><expan><abbr>eq</abbr><ex>uitum</ex></expan></w> <lb n="3"/> <w n="10"><expan><abbr>mag</abbr><ex>istri</ex></expan></w> <w n="11">vici</w> <w n="12">et</w> <w n="13">compiti</w> <lb n="4"/> <w n="14"><expan><abbr>M</abbr><ex>arcus</ex></expan></w> <w n="15">Blattius</w> <w n="16"><expan><abbr>M</abbr><ex>arci</ex></expan></w> <w n="17"><expan><abbr>f</abbr><ex>ilius</ex></expan></w> <lb n="5"/> <w n="18"><expan><abbr>M</abbr><ex>arcus</ex></expan></w> <w n="19">Cerrinius</w> <w n="20"><expan><abbr>M</abbr><ex>arci</ex></expan></w> <w n="21"><expan><abbr>f</abbr><ex>ilius</ex></expan></w> <lb n="6"/> <w n="22"><expan><abbr>M</abbr><ex>arcus</ex></expan></w> <w n="23">Sepullius</w> <w n="24"><gap reason="lost" extent="3" unit="character"/></w> <lb n="7"/> <w n="25"><gap reason="lost" extent="6" unit="character"/></w> <lb n="8"/> <w n="26"><expan><abbr>Q</abbr><ex>uintus</ex></expan></w> <w n="27">Pra<gap reason="lost" extent="3" unit="character"/></w> <lb n="9"/> <w n="28"><expan><abbr>C</abbr><ex>aius</ex></expan></w> <w n="29">Corne<supplied reason="lost">lius</supplied></w> <w n="30"><gap reason="lost" extent="3" unit="character"/></w> <lb n="10"/> <w n="31"><gap reason="lost" extent="6" unit="character"/></w> <lb n="11"/> <w n="32"><expan><abbr>P</abbr><ex>ublius</ex></expan></w> <w n="33">Ro<supplied reason="lost">c</supplied>ius</w> <w n="34"><gap reason="lost" extent="3" unit="character"/>s</w> <lb n="12"/> <w n="35">Salvius</w> <w n="36"><expan><abbr>E<gap reason="lost" extent="3" unit="character"/>ro</abbr></expan></w> <w n="37"><expan><abbr>M</abbr><ex>arci</ex></expan></w> <w n="38"><expan><abbr>s</abbr><ex>ervus</ex></expan></w> <lb n="13"/><gap extent="unknown" reason="lost" unit="line" /> <w n="39"><expan><abbr>C</abbr><ex>aio</ex></expan></w> <w n="40">Caes]are</w> <w n="41"><expan><abbr>M</abbr><ex>arco</ex></expan></w> <w n="42">Lepido</w> <w n="43"><expan><abbr>co</abbr><ex>n</ex><abbr>s</abbr></expan><expan><ex>ulibus</ex></expan></w> <lb n="14"/> <w n="44"><gap reason="lost" extent="3" unit="character"/></w> <w n="45">Blattius</w> <w n="46"><expan><abbr>M</abbr><ex>arci</ex></expan></w> <w n="47"><expan><abbr>f</abbr><ex>ilius</ex></expan></w> <lb n="15"/> <w n="48"><expan><abbr>C</abbr><ex>aius</ex></expan></w> <w n="49"><supplied reason="lost" cert="low">H</supplied>ermatorius</w> <w n="50"><expan><abbr>P</abbr><ex>ubli</ex></expan></w> <w n="51"><expan><abbr>f</abbr><ex>ilius</ex></expan></w> <lb n="16"/> <w n="52"><expan><abbr>M</abbr><ex>arcus</ex></expan></w> <w n="53"><gap reason="lost" extent="3" unit="character"/>ius</w> <w n="54"><expan><abbr>M</abbr><ex>arci</ex></expan></w> <w n="55"><expan><abbr>f</abbr><ex cert="low">ilius</ex></expan></w> <w n="56">Plutus</w> <lb n="17"/> <w n="57"><expan><abbr>M</abbr><ex>arcus</ex></expan></w> <w n="58">Stronnius</w> <w n="59"><expan><abbr>M</abbr><ex>arci</ex></expan></w> <w n="60"><expan><abbr>l</abbr><ex>ibertus</ex></expan></w> <w n="61">Nic<gap reason="lost" extent="3" unit="character"/>o</w> <lb n="18"/> <w n="62"><expan><abbr>M</abbr><ex>arcus</ex></expan></w> <w n="63">Oppius</w> <w n="64"><expan><abbr>S</abbr><ex>exti</ex></expan></w> <w n="65"><expan><abbr>l</abbr><ex>ibertus</ex></expan></w> <w n="66">Aes<supplied reason="lost" cert="low">chines</supplied></w> <w n="67"><expan><abbr>C</abbr><ex>aius</ex></expan></w> <w n="68">Cepidius</w> <w n="69"><expan><abbr>C</abbr><ex>ai</ex></expan></w> <w n="70"><supplied reason="lost"><expan><abbr>l</abbr><ex>ibertus</ex></expan></supplied></w> <w n="71"><gap reason="lost" extent="unknown" unit="character"/></w>
<lb n="1"/><w n="1"><expan><abbr>C</abbr><ex>aio</ex></expan></w> <w n="2">Iulio</w> <w n="3">Caesare</w> <w n="4"><expan><abbr>dict</abbr><ex>atore</ex></expan></w> <w n="5"><expan><abbr>iter</abbr><ex>um</ex></expan></w> <lb n="2"/> <w n="6"><expan><abbr>M</abbr><ex>arco</ex></expan></w> <w n="7">Antonio</w> <w n="8"><expan><abbr>mag</abbr><ex>istro</ex></expan></w> <w n="9"><expan><abbr>eq</abbr><ex>uitum</ex></expan></w> <lb n="3"/> <w n="10"><expan><abbr>mag</abbr><ex>istri</ex></expan></w> <w n="11">vici</w> <w n="12">et</w> <w n="13">compiti</w> <lb n="4"/> <w n="14"><expan><abbr>M</abbr><ex>arcus</ex></expan></w> <w n="15">Blattius</w> <w n="16"><expan><abbr>M</abbr><ex>arci</ex></expan></w> <w n="17"><expan><abbr>f</abbr><ex>ilius</ex></expan></w> <lb n="5"/> <w n="18"><expan><abbr>M</abbr><ex>arcus</ex></expan></w> <w n="19">Cerrinius</w> <w n="20"><expan><abbr>M</abbr><ex>arci</ex></expan></w> <w n="21"><expan><abbr>f</abbr><ex>ilius</ex></expan></w> <lb n="6"/> <w n="22"><expan><abbr>M</abbr><ex>arcus</ex></expan></w> <w n="23">Sepullius</w> <w n="24"><gap reason="lost" extent="3" unit="character"/></w> <lb n="7"/> <w n="25"><gap reason="lost" extent="6" unit="character"/></w> <lb n="8"/> <w n="26"><expan><abbr>Q</abbr><ex>uintus</ex></expan></w> <w n="27">Pra<gap reason="lost" extent="3" unit="character"/></w> <lb n="9"/> <w n="28"><expan><abbr>C</abbr><ex>aius</ex></expan></w> <w n="29">Corne<supplied reason="lost">lius</supplied></w> <w n="30"><gap reason="lost" extent="3" unit="character"/></w> <lb n="10"/> <w n="31"><gap reason="lost" extent="6" unit="character"/></w> <lb n="11"/> <w n="32"><expan><abbr>P</abbr><ex>ublius</ex></expan></w> <w n="33">Ro<supplied reason="lost">c</supplied>ius</w> <w n="34"><gap reason="lost" extent="3" unit="character"/>s</w> <lb n="12"/> <w n="35">Salvius</w> <w n="36"><expan><abbr>E<gap reason="lost" extent="3" unit="character"/>ro</abbr></expan></w> <w n="37"><expan><abbr>M</abbr><ex>arci</ex></expan></w> <w n="38"><expan><abbr>s</abbr><ex>ervus</ex></expan></w> <lb n="13"/><gap extent="unknown" reason="lost" unit="line" /> <w n="39"><expan><abbr>C</abbr><ex>aio</ex></expan></w> <w n="40">Caes]are</w> <w n="41"><expan><abbr>M</abbr><ex>arco</ex></expan></w> <w n="42">Lepido</w> <w n="43"><expan><abbr>co</abbr><ex>n</ex><abbr>s</abbr><ex>ulibus</ex></expan></w> <lb n="14"/> <w n="44"><gap reason="lost" extent="3" unit="character"/></w> <w n="45">Blattius</w> <w n="46"><expan><abbr>M</abbr><ex>arci</ex></expan></w> <w n="47"><expan><abbr>f</abbr><ex>ilius</ex></expan></w> <lb n="15"/> <w n="48"><expan><abbr>C</abbr><ex>aius</ex></expan></w> <w n="49"><supplied reason="lost" cert="low">H</supplied>ermatorius</w> <w n="50"><expan><abbr>P</abbr><ex>ubli</ex></expan></w> <w n="51"><expan><abbr>f</abbr><ex>ilius</ex></expan></w> <lb n="16"/> <w n="52"><expan><abbr>M</abbr><ex>arcus</ex></expan></w> <w n="53"><gap reason="lost" extent="3" unit="character"/>ius</w> <w n="54"><expan><abbr>M</abbr><ex>arci</ex></expan></w> <w n="55"><expan><abbr>f</abbr><ex cert="low">ilius</ex></expan></w> <w n="56">Plutus</w> <lb n="17"/> <w n="57"><expan><abbr>M</abbr><ex>arcus</ex></expan></w> <w n="58">Stronnius</w> <w n="59"><expan><abbr>M</abbr><ex>arci</ex></expan></w> <w n="60"><expan><abbr>l</abbr><ex>ibertus</ex></expan></w> <w n="61">Nic<gap reason="lost" extent="3" unit="character"/>o</w> <lb n="18"/> <w n="62"><expan><abbr>M</abbr><ex>arcus</ex></expan></w> <w n="63">Oppius</w> <w n="64"><expan><abbr>S</abbr><ex>exti</ex></expan></w> <w n="65"><expan><abbr>l</abbr><ex>ibertus</ex></expan></w> <w n="66">Aes<supplied reason="lost" cert="low">chines</supplied></w> <w n="67"><expan><abbr>C</abbr><ex>aius</ex></expan></w> <w n="68">Cepidius</w> <w n="69"><expan><abbr>C</abbr><ex>ai</ex></expan></w> <w n="70"><supplied reason="lost"><expan><abbr>l</abbr><ex>ibertus</ex></expan></supplied></w> <w n="71"><gap reason="lost" extent="unknown" unit="character"/></w>
CIL 04, 00131
Sittium a[e]d(ilem) [o(ro) v(os)] f(aciatis)
<lb n="1"/><w n="1">Sittium</w> <w n="2"><expan><abbr>a<supplied reason="lost">e</supplied>d</abbr><ex>ilem</ex></expan></w> <w n="3"><supplied reason="lost"><expan><abbr>o</abbr><ex>ro</ex></expan></supplied></w> <w n="4"><supplied reason="lost"><expan><abbr>v</abbr><ex>os</ex></expan></supplied></w> <w n="5"><expan><abbr>f</abbr><ex>aciatis</ex></expan></w>

0 comments on commit a3af949

Please sign in to comment.