Skip to content

Fix homograph lemma-disambiguation bugs found via vbs.cmp.ml diffing, add regression harness - #12

Open
whothefluff wants to merge 2 commits into
Alatius:masterfrom
whothefluff:fix-latin-lemmas-vbs_cmp_ml_regressions
Open

Fix homograph lemma-disambiguation bugs found via vbs.cmp.ml diffing, add regression harness#12
whothefluff wants to merge 2 commits into
Alatius:masterfrom
whothefluff:fix-latin-lemmas-vbs_cmp_ml_regressions

Conversation

@whothefluff

Copy link
Copy Markdown

This PR lands in two commits:

Adds a lemma-assertion test harness to run_tests.sh (run_assert_test), independent of any content changes.
The actual stemsrc fixes this harness exists to lock in, plus tests/latin_assertions_vbs_cmp_ml.txt.
Background: comparing ls.nom across a few forks surfaced a recurring bug class -- lemmas compiled without the #N sense number our L&S-matching code needs, so two distinct dictionary entries sharing a spelling (canis/Canis, dis/Dis, ...) collapse into one ambiguous lemma once case is folded. Full list of what's fixed is in the second commit message; the assertion file is the living, checkable record of it.

This is the third and last of the series. See tests/README_ASSERTIONS.md (added here) for how the assertion files are organized and why they're named by investigation, not by source-file coverage.

There are potentially more broken entries, although I'm not sure if there's an easy way to identify all or most of them quickly. Alas, a problem for a more generous soul.

Add run_assert_test(), which checks that a surface form resolves
(via -Ll) to an exact set of expected lemmas.

Assertions live in tests/latin_assertions*.txt: form, tab, one or
more expected lemmas, with optional "(...)" commentary stripped
before comparison. Multiple lines for the same form are unioned
into one expected set. The harness globs for any matching file,
so adding a new assertion file needs no code change here.

This is orthogonal to the existing baseline-diff tests: it checks
lemma disambiguation (which L&S sense a form resolves to), not
full morphological output, and has no --update mode (expected
values are hand-written against the L&S dictionary, not captured from
a prior run).
- Update vbs.cmp.ml after checking the dictionary for valid entries (from previously commented lines only).
- Along with it (when necessary to obtain a correct lemma), updated also other files like vbs.latin, vbs.latin.bas, and irreg.vbs.src with 1) corrections, 2) new verbs and forms and 3) removal of entries that were either incorrect or had a problem with the auto-generated compound.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant