Skip to content

Fix LT-22249: Don't modify existing analysis on flextext import#442

Merged
jasonleenaylor merged 2 commits into
release/9.3from
bugfix/flextextImport
Aug 21, 2025
Merged

Fix LT-22249: Don't modify existing analysis on flextext import#442
jasonleenaylor merged 2 commits into
release/9.3from
bugfix/flextextImport

Conversation

@jasonleenaylor

@jasonleenaylor jasonleenaylor commented Aug 15, 2025

Copy link
Copy Markdown
Contributor

This change is Reviewable

@jasonleenaylor

Copy link
Copy Markdown
Contributor Author

I haven't completely evaluated my logic related to the morpheme matching, this is working for the initial test case but needs more testing of different scenarios before we consider it complete.

@jtmaxwell3 jtmaxwell3 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I looked at this code today, the bug was that FindExistingGloss found an analysis that matched the wordform and the gloss but not the morphemes, and that the code that followed FindExistingGloss changed the morphemes. Don't you have the same problem if FindExistingAnalysisStack fails?

@jtmaxwell3

Copy link
Copy Markdown
Collaborator

The bug is in UpdateToWordGloss, not FindExistingGloss.

Also, I don't see how FindExistingAnalysisStack verifies that the morphemes are in the right order or that there aren't extra morphemes or glosses in the analysis.

@jasonleenaylor jasonleenaylor marked this pull request as ready for review August 21, 2025 18:18

@jtmaxwell3 jtmaxwell3 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I read through all of the code and I didn't see any problems. I'm trusting the test cases to catch anything I might have missed in the code.

* Reuse wordforms that are matches but create new anaysis for them
* Add Normalization before string comparison
* Split Morpheme and glossing logic

Goal: If the imported data is a subset of an existing analysis then
 use the existing analysis, otherwise create a new analysis and add
 it to a matching Wordform.
@jasonleenaylor jasonleenaylor enabled auto-merge (squash) August 21, 2025 21:04
@jasonleenaylor jasonleenaylor merged commit 0a59600 into release/9.3 Aug 21, 2025
4 checks passed
@jasonleenaylor jasonleenaylor deleted the bugfix/flextextImport branch August 21, 2025 21:15
jasonleenaylor added a commit that referenced this pull request Sep 19, 2025
* Reuse wordforms that are matches but create new anaysis for them
* Add Normalization before string comparison
* Split Morpheme and glossing logic

Goal: If the imported data is a subset of an existing analysis then
 use the existing analysis, otherwise create a new analysis and add
 it to a matching Wordform.
# Conflicts:
#	Src/LexText/Interlinear/BIRDInterlinearImporter.cs
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.

2 participants