Commit e505cadc authored by eckhart's avatar eckhart

Hochstellungen innerhalb von Verweisen-Blöcken nicht erkannt.

parent 8244b205
......@@ -31,7 +31,7 @@ SCHREIBWEISE
* CONR. MUR. summ.; p.138,19 "simplex #sacerdo.|s."
* CHART. Xant.; 251 p. 163,35 "qui #sacerdo.|s ... ad omnia et singula teneantur, ad que #sacerdot.|es, qui dicuntur elemosinarii, sunt astricti."
* CHART. Austr. sup. II; 508 p. 468,27 "que {(memoria)} habetur pro nostris confratribus #sacerdoti.|bus regularibus."
{v. et {=> sacerdos_6}{=> forensis p. 379,49.|-}{=> hebdomadarius 961,1.|-}{=> sacerdotalis/sacerdos_7}{=> vol. II. p. 1275,5|conducticius/}.}
{v. et {=> sacerdos_6}{=> forensis p. 379,49.|-}{=> hebdomadarius 961,1.|-}{=> sacerdotalis/sacerdos_7}{=> conducticius vol. II. p. 1275,5| - }.}
UUU_BEDEUTUNG proverb.:
* WALAHFR. Wett.; 361 "plebis erit similis stultae peccando #sacerdo.|s {(spectat ad Vulg. Is. 24,2)}."
UUU_BEDEUTUNG in formula modestiae:
......
......@@ -5,7 +5,7 @@ GRAMMATIK
STRUKTUR
?abl. pl.:
-gis: CAPIT. reg. Franc.; 89,8 {(v. app. crit.)}
-gis: CAPIT. reg. Franc.; 89,8 {(v. app. crit. {=>https://www.dmgh.de/mgh_capit_1/index.htm#page/189/mode/1up})}
BEDEUTUNG strictius i. q. furtum rerum sacrarum -- Diebstahl von geweihten Gegenständen, Tempel-, Kirchenraub:
......@@ -19,22 +19,7 @@ ANHÄNGER in figura rhet. oxymorum q. d.:
* VITA Chrod.; 29 p. 570,30 "quod sanctus Chrodegangus peracto sancto #sacrilegi.|o ... versus patriam tendere coepit."
/* * GUNTH. PAR. hist.; 19,41 "quem {(thesaurum)} videns abbas ... cupide utrasque manus inmersit et ... sacro #sacrilegi.|o
(sacerlegio {=>München, Universitätsbibliothek, ms. 4° 321, f. 17^v | https://epub.ub.uni-muenchen.de/17286/1/4Cod.ms.321_Sept.2013.pdf#page=36},
{=>Colmar, Bibliothèque de la Ville, ms. 434 (248) | https://ccfr.bnf.fr/portailccfr/ark:/06871/004D52013650},
sacrilgio {=>München, Bayerische Staatsbibliothek, clm 903, f. 138^v | https://api.digitale-sammlungen.de/iiif/presentation/v2/bsb00095232/canvas/290/view}
{codd.}) sinus suos implens ... ea, que sibi potissima videbantur, sagaciter occultavit." */
* GUNTH. PAR. hist.; 19,41 "quem {(thesaurum)} videns abbas ... cupide
utrasque manus inmersit et ... sacro #sacrilegi.|o
(sacerlegio
{=>München, Universitätsbibliothek, ms. 4° 321, f. 17^v |
https://epub.ub.uni-muenchen.de/17286/1/4Cod.ms.321_Sept.2013.pdf#page=36},
{=>Colmar, Bibliothèque de la Ville, ms. 434 (248) |
https://ccfr.bnf.fr/portailccfr/ark:/06871/004D52013650},
sacrilgio {=>München, Bayerische Staatsbibliothek, clm 903, f. 138^v |
https://api.digitale-sammlungen.de/iiif/presentation/v2/bsb00095232/canvas/290/view}
{codd.}) sinus suos implens ... ea, que sibi potissima videbantur, sagaciter occultavit."
* GUNTH. PAR. hist.; 19,41 "quem {(thesaurum)} videns abbas ... cupide utrasque manus inmersit et ... sacro #sacrilegi.|o (sacerlegio {=>München, Universitätsbibliothek, ms. 4° 321, f. 17^v | https://epub.ub.uni-muenchen.de/17286/1/4Cod.ms.321_Sept.2013.pdf#page=36}, {=>Colmar, Bibliothèque de la Ville, ms. 434 (248) | https://ccfr.bnf.fr/portailccfr/ark:/06871/004D52013650}, sacrilgio {=>München, Bayerische Staatsbibliothek, clm 903, f. 138^v | https://api.digitale-sammlungen.de/iiif/presentation/v2/bsb00095232/canvas/290/view} {codd.}) sinus suos implens ... ea, que sibi potissima videbantur, sagaciter occultavit."
BEDEUTUNG latius i. q. profanatio, violatio religionis, pollutio, nefas, impietas -- Religionsschändung, -frevel, Freveltat,'Sakrileg':
......@@ -67,7 +52,7 @@ BEDEUTUNG latius i. q. profanatio, violatio religionis, pollutio, nefas, impieta
* TRAD. Patav.; 318 "Eppo ... predium ... in usus fratrum ... Deo servientium tradidit ... in compositionem #sacrilegi.|i {@sacrilegium_1} ...; quod #sacrilegi.|um ... Manegoldus in Pataviense monasterium commisit, dum interfectores ... fratris sui ... in illud fugientes interfecit."
* WIBALD. epist.; 364 p. 766,5 "ego ... subdiaconus appello te ... episcopum ad presentiam domini papae de #sacrilegi.|o eo, quod tuo consilio et iussu exoculatus sim et plagatus {v. et {=>sacrilegium_3}}."
* WIBALD. epist.; 364 p. 766,5 "ego ... subdiaconus appello te ... episcopum ad presentiam domini papae de #sacrilegi.|o eo, quod tuo consilio et iussu exoculatus sim et plagatus. {v. et {=>sacrilegium_3}}."
ANHÄNGER de iniuria {@sacrilegium_2}, contumelia:
......
LEMMA
\ No newline at end of file
LEMMA sacrilegus
GRAMMATIK adi. I; -a, -um
AUTORIN Clementi
\ No newline at end of file
......@@ -602,7 +602,15 @@ class MLWCompiler(TreeProcessor):
externer_verweis = False
try:
text = moved_ws + first(node['alias']).content
alias = first(node['alias'])
if alias.children:
if alias.children[0].tag_name == 'TEXT':
alias.children[0].result = moved_ws + alias.children[0].result
text = alias.children
else:
text = (Node('TEXT', moved_ws),) + alias.children
else:
text = moved_ws + alias.content
alias_attr = ''
except KeyError:
text = ''
......
......@@ -536,6 +536,10 @@ def show(context, tags: AbstractSet[str]=frozenset()):
print(context[-1].as_xml())
def show_context(context):
print([nd.tag_name for nd in context])
EBENEN_LISTE = ['Bedeutung', 'U1Bedeutung', 'U2Bedeutung',
'U3Bedeutung', 'U4Bedeutung', 'U5Bedeutung']
......@@ -762,18 +766,21 @@ TextAuszeichnungen = {'HOCHGESTELLT', 'ROEMISCHE_ZAHL', 'GRI_WORT', 'Kursiv', 'S
MLW_AST_transformation_table = {
# AST Transformations for the MLW-grammar
"<": [remove_children_if(lambda ctx: (is_empty(ctx) and (is_anonymous(ctx) or is_wsp(ctx))) or
"<": [# apply_if(show_context, lambda ctx: ctx[-1].tag_name == "HOCHGESTELLT" and ctx[-1].content.startswith("^v")),
remove_children_if(lambda ctx: (is_empty(ctx) and (is_anonymous(ctx) or is_wsp(ctx))) or
(is_one_of(ctx, {'LZ', 'DPP', 'COMMENT__', 'ABS', 'SEM'})) or
(is_token(ctx) and is_anonymous(ctx)
and not has_ancestor(ctx, {
'Name', 'wortart', 'wortarten',
'EtymologieSprache', 'genus', 'genera',
'DeutscheBedeutung', 'flexion', 'Verweise',
'DeutscheBedeutung', 'flexion', # 'Verweise',
'LateinischeBedeutung', 'Nachtrag',
'FesterZusatz', 'casus', 'numerus',
'genus', 'nicht_klassisch', 'ziel', 'pfad',
'ET_Fehler', 'PRAETER_Fehler', 'VIDE_Fehler',
'VIDE', 'ET', 'PRAETER', 'KOMMA', 'ZITAT_ENDE'}, 1000)))],
'VIDE', 'ET', 'PRAETER', 'KOMMA', 'ZITAT_ENDE'}, 1000))),
# apply_if(show, lambda ctx: ctx[-1].tag_name == "HOCHGESTELLT")
],
"nicht_klassisch": [move_whitespace, reduce_single_child, replace_content_with('✶')], # sechszackig fett
"etymologie_stern": [move_whitespace, reduce_single_child, replace_content_with('*')], # sechszackig dünn (Schneeflocke)
"verweis_stern": [move_whitespace, reduce_single_child, replace_content_with('٭')],
......@@ -982,7 +989,7 @@ MLW_AST_transformation_table = {
"EinzelVerweis": [flatten, remove_tokens, move_whitespace, replace_by_children],
"VerweisKern": [flatten, remove_tokens, lstrip, replace_by_children], # drop_whitespace],
"alias": [strip, collapse_children_if(not_one_of(TextAuszeichnungen), TEXT),
reduce_single_child],
merge_adjacent(lambda ctx: ctx[-1].tag_name == 'TEXT'), reduce_single_child],
"NullVerweis": [drop_whitespace],
"pfad, ziel": [drop_whitespace, collapse], # [apply_if(transform_content(lambda s: ''), has_parent("URL"))],
"Anker": [lstrip, move_whitespace, remove_anonymous_tokens, reduce_single_child],
......
This diff is collapsed.
[match:alias]
M1: "München, Universitätsbibliothek, ms. 4 321"
M2: "Colmar, Bibliothèque de la Ville, ms. 434 (248)"
M1*: "München, Universitätsbibliothek, ms. 4 321"
M2*: "Colmar, Bibliothèque de la Ville, ms. 434 (248)"
M3*: """München, Universitätsbibliothek, ms. 321, f. 17^v"""
[match:Zusatz]
M1: """{v. et {=> sacerdos_6}{=> forensis p. 379,49.|-}{=> hebdomadarius 961,1.|-}{=> sacerdotalis/sacerdos_7}{=> conducticius vol. II. p. 1275,5|-}.}"""
......@@ -10,7 +11,7 @@ M1: """{v. et {=> sacerdos_6}{=> forensis p. 379,49.|-}{=> hebdomadarius 961,1.|
M1: """* ADAM gest.; 3,46 p. 189,25 (codd. B, C {=>https://daten.digitale-sammlungen.de/bsb00000756/images/index.html?id=00000756&groesser=&fip=193.174.98.30&no=&seite=17})
"o #sacrilegi.|um! duae cruces auro paratae cum gemmis, altare maius et calix, ambo rutilantia ex auro ..., confracta sunt (({postea:} "narravit faber ... magno se dolore coactum ad hoc #sacrilegi.|um,
ut confringeret illas cruces"))." """
M2: """* GUNTH. PAR. hist.; 19,41 "quem {(thesaurum)} videns abbas ... cupide utrasque manus inmersit et ... sacro #sacrilegi.|o
M2*: """* GUNTH. PAR. hist.; 19,41 "quem {(thesaurum)} videns abbas ... cupide utrasque manus inmersit et ... sacro #sacrilegi.|o
(sacerlegio {=>München, Universitätsbibliothek, ms. 321, f. 17^v | https://epub.ub.uni-muenchen.de/17286/1/4Cod.ms.321_Sept.2013.pdf#page=36},
{=>Colmar, Bibliothèque de la Ville, ms. 434 (248) | https://ccfr.bnf.fr/portailccfr/ark:/06871/004D52013650},
sacrilgio {=>München, Bayerische Staatsbibliothek, clm 903, f. 138^v | https://api.digitale-sammlungen.de/iiif/presentation/v2/bsb00095232/canvas/290/view}
......@@ -29,6 +30,7 @@ M5: """-rto(s): {=> sacerdos_3}"""
[match:EinzelVerweis]
M1: """{=> p. 379,49.| - }"""
M2: """{=>München, Universitätsbibliothek, ms. 321, f. 17^v | https://epub.ub.uni-muenchen.de/17286/1/4Cod.ms.321_Sept.2013.pdf#page=36}"""
[match:Position]
......
......@@ -176,6 +176,18 @@ class TestMLWCompiler:
rn = self.compile(link, 'wa_ergänzung')
assert not rn.errors
def test_alias(self):
einzel_verweis = """{=>München, Universitätsbibliothek, ms. 4° 321, f. 17^v
| https://epub.ub.uni-muenchen.de/17286/1/4Cod.ms.321_Sept.2013.pdf#page=36}"""
rn = self.compile(einzel_verweis, 'Verweise')
print()
print(flatten_sxpr(rn.as_sxpr()))
expected = '(Verweise (a ' \
'`(href "https://epub.ub.uni-muenchen.de/17286/1/4Cod.ms.321_Sept.2013.pdf#page=36")'\
' (TEXT "München, Universitätsbibliothek, ms. 4° 321, f. 17") (HOCHGESTELLT "v")))'
print(expected)
assert flatten_sxpr(rn.as_sxpr()) == expected
def test_Belege(self):
belege = '''* PAUL. DIAC. Lang.; 5,27 "in ipso sacratissimo #sabbat.|o {!paschali}
((* AMALAR. off.; 1,35,3 "dies quinquaginta, qui secuntur a #sabbat.|o p|.aschali usque ad octavas pentecostes"
......@@ -214,11 +226,13 @@ class TestMLWCompiler:
def test_Rueckwaertsverweis(self):
st = parse_sxpr('(Verweise (Verweis (alias (TEXT "p. ") (TEXT "379,49.")) (L " ") (URL (pfad "forensis/"))))')
# st = parse_sxpr('(Verweise (Verweis (alias (TEXT "p. ") (TEXT "379,49.")) (L " ") (URL (pfad "forensis/") (ziel "x"))))')
self.mlw_transformer(st)
rn = self.mlw_compiler(RootNode(st).with_pos(0))
assert rn.as_sxpr() == '(Verweise (a `(href "forensis.xml") "p. 379,49."))'
def test_Verweis_ohne_Ziel(self):
st = parse_sxpr('(Verweise (Verweis (alias (TEXT "p. ") (TEXT "379,49.")) (L " ") (URL (ziel "-"))))')
self.mlw_transformer(st)
rn = self.mlw_compiler(RootNode(st).with_pos(0))
assert rn.as_sxpr() == '(Verweise (a `(href "-") "p. 379,49."))'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment