fix(normalizer): preserve trailing Bemerkung text after parent pattern

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-05-25 21:12:45 +02:00
parent ace41ad209
commit 34c40cb0ee
2 changed files with 20 additions and 2 deletions

View File

@@ -418,3 +418,16 @@ def test_parse_bemerkung_plain_remark():
)
assert rels == [] and unres == []
assert notes == "Verfasserin der Cram-Chronik !!"
def test_parse_bemerkung_sohn_with_trailing_remark():
_, idx = _register(
("row_019", "Clara", "Cram", "de Gruyter"),
("row_028", "Herbert", "Cram", None),
)
rels, unres, notes = persons_tree._parse_bemerkung(
"row_021", "Sohn v Clara Cram u Herbert Cram, nach Mexiko emigriert", idx
)
assert len(rels) == 2
assert unres == []
assert notes == "nach Mexiko emigriert"