Repository navigation
HermitCrab analysis: excluded co-occurrence check is sound but cuts 0% of work on real grammars (parked) #602
Description
Claude-drafted.
An excluded morpheme co-occurrence check during analysis is sound and cheap, but it cut 0% of total work on all five real grammars measured. It helps only where exclusion rules are dense. Parked, not built in C#.
What we know (candidate E4; total work; parse results identical):
- Aweti, Mbugwe, Sena, Amharic, Indonesian: 0%. Conformance suite (1,492 words): 0.23%.
- Synthetic stress fixtures: 3.2% on the brief's fixture (below its 25% kill bar), and 31.3% and 19.8% on two dense-exclusion fixtures added later.
- It is the only experiment of the round that cuts analysis events, because it prunes an analysis subtree where the forbidden pair completes.
- It checks
Exclude+Anywheremorpheme and allomorph co-occurrence rules, indexed per morpheme whenMorpheris built.
Not known: whether any owner grammar has dense exclusions. FieldWorks projects that use ad hoc co-prohibitions to suppress spurious parses are the likely candidates (inferred).
Proposed change: keep the check behind a flag. Run it on any grammar with many exclusions and record the step counts before and after. Do not merge unless a real grammar shows a reduction in work steps.
Related:
- PanGloss: pointer Port check: excluded co-occurrence check, 0% gain on real grammars (machine#602) PanGloss#104 (no port of E4).
- HermitCrab optimization round record: what was tried, and a faster package that is not mergeable #490 (closed PR, the retired record); HermitCrab: dead ends and measured-and-rejected speedups (record, from PR #490) #601 (the other rejected candidates).
Next: find a grammar with many exclusion rules and count analysis work with the flag off and on.
Evidence -- E4 results, total work
| Corpus | Analysis events, off to on | Synthesis steps, off to on | Less total work |
|---|---|---|---|
| Aweti, Mbugwe, Sena, Amharic, Indonesian | unchanged | unchanged | 0% |
| Conformance (1,492 words) | 27,765 to 27,705 | 8,246 to 8,223 | 0.23% |
stress-excluded-cooccurrence (the brief's fixture) |
4,690 to 4,605 | 326 to 250 | 3.2% |
stress-athabaskan-prefix-complex |
8,937 to 6,347 | 891 to 404 | 31.3% |
stress-bantu-extension-chain |
10,552 to 8,548 | 515 to 332 | 19.8% |
Hooks: rules that name only affixes are checked after unapplying; rules that name a root are checked per alternative after lookup. Soundness holds under Anywhere (anti-monotone), with these restrictions: an "other" counts only if its recorded allomorph always leaves a morph annotation; Somewhere*, Adjacent* and Require stay late. Landing findings: merged analyses must be filtered per alternative, not on the canonical word; with pruning on, MaxAlternatives counts fewer candidates, so its exception can stop firing; the rule index is read at construction, so a rule added later is not pruned early. Open question: whether synthesis phonological deletion removes morph annotations, which would extend the zero-width restriction.
The code is on an unpushed branch (perf/hc-excluded-cooccurrence at 02873608), not on GitHub.
What would reopen this
A real grammar with dense exclusions in which the flag-on run cuts analysis events plus synthesis steps by a meaningful share, with unchanged parses.
Sources -- pinned, from the closed PR #490
- E4 design and E4 result.
- Ledger row 35.
- Open-question line on deletion: round doc line 719.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fields🆕 New
Activity
[-]HermitCrab analysis: excluded co-occurrence check (parked; sound, effective only on dense exclusions)[/-][+]HermitCrab analysis: excluded co-occurrence check is sound but cuts 0% of work on real grammars (parked)[/+]