fix: Abbildungs-Gegenprobe ohne kopierbares Beispiel, Kennungen vereinheitlicht
- Prompt-Beispiel '1 → 2: 3' durch Schema 'A → B: Wert' ersetzt: eine Lesung hatte nur die Beispielzeile übernommen statt aller fünf Pfeile; alle Datenpunkte verlangt - canonical_figure_id: '1' und 'Abbildung 1' gelten als dieselbe Abbildung – beim Vergleich, in der Pipeline und im Report (Formfehler im zweiten Testlauf) Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
101d55b713
commit
89b61d8c62
1 changed files with 35 additions and 9 deletions
|
|
@ -150,3 +150,16 @@ def test_reading_comparison_ignores_wording_but_not_assignment():
|
|||
assert check_figure_readings([GRAPH], [vertauscht])
|
||||
richtung = GRAPH.model_copy(update={"transcription": GRAPH.transcription.replace("3 → 2: 1", "2 → 3: 1")})
|
||||
assert check_figure_readings([GRAPH], [richtung])
|
||||
|
||||
|
||||
def test_figure_ids_are_compared_by_number():
|
||||
# beobachtet: Lesung 1 schrieb als Kennung nur „1“, Lesung 2 „Abbildung 1“ – Inhalt identisch
|
||||
from understanding.figures import canonical_figure_id
|
||||
assert check_figure_readings([GRAPH.model_copy(update={"id": "1"})], [GRAPH]) == []
|
||||
assert canonical_figure_id("Abb. 2") == "Abbildung 2"
|
||||
|
||||
|
||||
def test_short_id_in_understanding_still_reaches_the_report():
|
||||
result, _ = _lauf(GRAPH.model_copy(update={"id": "1"}), [GRAPH])
|
||||
html = to_html(build_document(result))
|
||||
assert "nicht übertragen" not in html and "Pfeil 3 → 4: 5" in html
|
||||
|
|
|
|||
Loading…
Reference in a new issue