Repository navigation
Use IsCliticRule to allow clitics to apply to templates - #529
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #529 +/- ##
=======================================
Coverage 74.36% 74.36%
=======================================
Files 456 456
Lines 38292 38325 +33
Branches 5251 5263 +12
=======================================
+ Hits 28474 28499 +25
- Misses 8667 8669 +2
- Partials 1151 1157 +6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
The conformance suite in #480 has a negative control this changes. In As I read it, stratum Is a final template that adds nothing meant to complete a non-final template from an earlier stratum? If so, I'll change the fixture to expect the parse. If not, the closing check should not count a template that applied vacuously. |
|
@johnml1135 If a final template that adds nothing completes a non-final template within the same stratum, then it should also complete a non-final template in an earlier stratum. This is a change in behavior, since earlier a change in strata caused non-final templates that hadn't been completed to fail. For background, strata were originally designed to handle languages like English that had a Germanic layer on top of a Latin/Greek layer. Latin/Greek affixes should only apply to Latin/Greek roots. The idea was that the Latin/Greek affixes and roots would be in one stratum, and the Germanic affixes and roots would be in another. This was never implemented in FieldWorks: everything went in one stratum except for the phonology and clitics, and affixes were restricted to particular roots using an attribute instead. When I added Strata to FieldWorks recently it was for performance reasons, but it interacted badly with final/non-final templates and clitics. Damien gave me permission to change how clitics were detected, but I also had to change how final/non-final templates were handled. This change should be backwards compatible with existing FieldWorks grammars because users couldn't add strata until recently and it is considered an experimental feature. |
This comment has been minimized.
This comment has been minimized.
johnml1135
left a comment
There was a problem hiding this comment.
Thanks — that makes sense, and the strata background helps. I've adjusted the #480 fixture so kulpu stays a same-stratum negative control: the later stratum's template no longer applies to it, and it passes both before and after this PR. Once both are in, I'll add a positive case pinning the cross-stratum completion you describe.
Public API: new public property Findings: F1 addressed; F2 addressed; F3 addressed; F4 addressed; F5 addressed; F6 addressed; F7 addressed; F8 addressed; F9 addressed; F10 withdrawn; F11 addressed; F12 addressed. No new findings this round. Reviewed at 835d137 |
#529 added isCliticRule to MorphologicalRule and RealizationalRule in the library DTD, and let a vacuous final template in a later stratum complete a non-final template from an earlier one. - Sync conformance/HermitCrabInput.dtd with the library copy, and add ConformanceDtdTests so the two cannot drift again: the coverage inventory is read from the conformance copy, so a missed sync hides new surfaces. - Add edge-cases/clitic-rule-designation: isCliticRule true and false on MorphologicalRule, the "Clitics" stratum default, stacked clitics, and the cross-stratum completion of a non-final template (kolpu). - Keep morphotactic-attribute-breadth's kulpu a same-stratum negative control: the Second stratum's material moves to its own part of speech, so no later final template applies to kul. - Map the ten new DTD surfaces in semantic-catalog.yaml. The two RealizationalRule/isCliticRule values stay todo in the baseline: the engine never reads them, and FieldWorks does not use realizational rules. - Point conformance/docs/README.md at PanGloss's xample-projector, which produces the .fwdata witnesses and runs the XAMPLE comparison. - Regenerate the ledgers and re-pin the measured counts. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Thanks — done in #480, now rebased on master. The conformance DTD is synced, and a new test fails if it ever drifts from the library's embedded copy. A new fixture, |
This uses IsCliticRule to allow clitics to apply to templates instead of clearing FinalTemplateState and IsLastAppliedRuleFinal at the end of each stratum (since clitics are in a different stratum). This is necessary now that FieldWorks lets users specify the strata for performance reasons. Non-final templates and partial parses are only checked on the last stratum.
Damien agreed to something like this in an earlier discussion.
I also had to make changes at line 67 of SynthesisAffixTemplateRule and line 70 of SynthesisStratumRule to make this work.
This change is