Skip to content

LT-22203: punct only line; multiple punct; rare no morph#405

Merged
AndyBlack merged 2 commits into
release/9.3from
LT22059
Jul 25, 2025
Merged

LT-22203: punct only line; multiple punct; rare no morph#405
AndyBlack merged 2 commits into
release/9.3from
LT22059

Conversation

@AndyBlack

@AndyBlack AndyBlack commented Jul 18, 2025

Copy link
Copy Markdown
Collaborator

This fixes three issues in XLingPaper interlinear export. The fixes are all in the xml2XLingPapCommonConcatMorphemes.xsl file. The diff may be a bit hard to read since it looks like a lot of changes, but it's a case of having to create some "choose/when" items to fix them so a lot of code which stays the same is now in a different location.
The three issues are:

  1. If a line begins with two punct items, only the first is output. The fix is:

<xsl:value-of select="normalize-space(.)"/>

  1. If a line has no vernacular words in it at all (as in the new BruceCoxEmpty test case), then the punct items are not output at all and there is an empty element in the XLingPaper output. The fix is in the first (new) choose/when case with this comment:
  1. In rare cases (as illustrated in the new Jibiyal3Text test case), the FLExText would not have a word with a failed morphemes indication. (as in text 59 in the text) The fix is the code in this choose/when case:
    <xsl:when test="name()='morph'">

As mentioned, there are two new test cases to check for these issues. The existing nszEnglishWords test case needed to be updated because it, too, had cases fixed by number 1.


This change is Reviewable

Change-Id: Ib92c66d6a7db544086f1413e59f04eaaffa1f536

@jasonleenaylor jasonleenaylor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sorry, xslt takes me a while to review. It makes my brain hurt. :lgtm:

Reviewed 7 of 7 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @AndyBlack)

@AndyBlack

Copy link
Copy Markdown
Collaborator Author

Yes, it can be challenging. I wish these changes did not make it even harder with so much actually being the same, just in a different location.
Thanks for doing it, though.

@AndyBlack AndyBlack merged commit ca7cb21 into release/9.3 Jul 25, 2025
5 checks passed
@AndyBlack AndyBlack deleted the LT22059 branch July 25, 2025 17:04
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