Repository navigation
Filter synthesis by the allomorphs used - #548
jtmaxwell3 wants to merge 5 commits into
Conversation
| appliedAllomorphIndices.Add(i); | ||
|
|
||
| if (_rule.Blockable && outWord.CheckBlocking(out Word newWord)) | ||
| if (input.IsAllomorphApplicable(allo)) |
There was a problem hiding this comment.
FYI: F6. An allomorph that matches but was not used in analysis is dropped with no trace event, neither MorphologicalRuleApplied nor MorphologicalRuleNotApplied. In a Try-a-Word trace it just disappears, which hides cases like F1.
There was a problem hiding this comment.
F6 still applies at bb7211a: the reworked block at SynthesisAffixProcessRule.cs:199 still drops a matched but unused allomorph with no trace event, and the MPR failures for unused allomorphs are now untraced too.
There was a problem hiding this comment.
F6 still applies at f7aea42: the MPR failures at SynthesisAffixProcessRule.cs:150 and :167 are traced again, but an allomorph that matches and was not used in analysis (the IsAllomorphApplicable check at line 199) still produces neither MorphologicalRuleApplied nor MorphologicalRuleNotApplied, so it vanishes from a trace.
This comment has been minimized.
This comment has been minimized.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #548 +/- ##
==========================================
+ Coverage 74.57% 74.59% +0.01%
==========================================
Files 453 453
Lines 38314 38332 +18
Branches 5280 5283 +3
==========================================
+ Hits 28573 28593 +20
+ Misses 8576 8574 -2
Partials 1165 1165 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This comment has been minimized.
This comment has been minimized.
|
Approve. The new head adds a test for the allomorph filter and traces MPR failures for every allomorph again. Only a Low trace gap remains.
Public API, target framework, package, or Findings: F1 addressed; F2 addressed; F3 withdrawn; F4 addressed; F5 addressed; F6 open. Reviewed at f7aea42 |
Parsing "kanna" in the DolganShared project takes forever to synthesize because many of the morphemes have lots of unconstrained allomorphs. For instance, the -LA: morpheme has more than 30 unconstrained allomorphs. The synthesizer tries all possible combinations of allomorphs in order to find the combination that produces the input word. One analysis of "kanna" had 5 morphemes that together had ~10,000 allomorph combinations. This was just one of 315 analyses for "kanna".
This pull request solves the problem by recording the allomorphs used during analysis and restricting the synthesizer to only use those allomorphs. This reduces the number of syntheses for "kanna" by four orders of magnitude.
Filtering by allomorphs wasn't as simple as you might imaging because some allomorphs block other free fluctuation allomorphs, so I couldn't just filter allomorphs at the top of the loop.
This change is