Merge duplicate token analyses on PT9 import (#313) - #392
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
jasonleenaylor
left a comment
There was a problem hiding this comment.
Nit, not blocking: test-data/pt9-projects/README.md:66 still says the plovs pool key gets four competing payloads; with this merge it's three (as your test plan says).
This review was assisted by Claude Opus 5.5.
alex-rawlings-yyc
left a comment
There was a problem hiding this comment.
Fixed.
@alex-rawlings-yyc made 2 comments.
Reviewable status: 0 of 10 files reviewed, all discussions resolved (waiting on alex-rawlings-yyc).
jasonleenaylor
left a comment
There was a problem hiding this comment.
@jasonleenaylor reviewed 10 files and all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on alex-rawlings-yyc).
Closes #313.
Summary
analysesAreIdenticalrule, so surface forms differing only in case also merge. It covers both analyses from interlinear clusters and the unlinked ones from the word-analysis inventories.merge.identicalPayloadsMergedcount. The import modal doesn't show it.buildBareWordAnalyseskeeps its own duplicate check, soskippedExistingIdenticalstill counts what it did. The merge runs after every other conversion step, so analyses made identical by #324's blank-morpheme stripping will merge too.Out of scope: a merged analysis shows the surface text of whichever token came first, e.g. a capitalized sentence-initial form; deriving the displayed form from its links belongs to #186. PT9 import still writes one phrase payload per occurrence; that has its own issue.
Test plan
test-data/pt9-projects/PIA): the fourplovstokens in PHP 1:6-7 end up on three analyses, with the two "catorce / plov s" occurrences sharing oneplovssuggestion dropdown has no duplicate rowsThis change is