Skip to content

Add parsers for the remaining PT9 interlinear files - #238

Open
jasonleenaylor wants to merge 1 commit into
pt9-lossless-parser-modelfrom
pt9-import
Open

Add parsers for the remaining PT9 interlinear files#238
jasonleenaylor wants to merge 1 commit into
pt9-lossless-parser-modelfrom
pt9-import

Conversation

@jasonleenaylor

@jasonleenaylor jasonleenaylor commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Parse Lexicon.xml, WordAnalyses.xml, and InterlinearSetup.xml into models that mirror the file shapes alongside the existing interlinear parser, as the first slice of the PT9 import pipeline:

  • lexemeKey.ts holds the shared LexemeKeyData shape and pure helpers (parse/compose/equality) for PT9's Type:Form[:Homograph] id grammar, with homograph 1 omitted from composed ids and unknown type names preserved.
  • lexiconXmlParser.ts parses entries (senses, per-language glosses) and the legacy Analyses section (wordform -> ordered lexeme keys, as a record matching how the interlinear parser represents Verses).
  • wordAnalysesXmlParser.ts parses the wordform-to-parse inventory, keeping lexeme ids as raw composed strings.
  • interlinearSetupXmlParser.ts parses per-language configuration fully leniently: every field optional, unknown type names kept as raw strings.

All parsers are identity-strict and otherwise preserve optional data as written: they throw only on a missing root, duplicate dictionary keys, or entries missing their identity; absent attributes and elements stay absent.

Grow pt9-xml.md into the four-file format reference with a shared conventions section, and add coherent test-data fixtures whose sense ids and lexeme keys resolve against Interlinear_en_MAT.xml.

🤖 Generated with Claude Code


This change is Reviewable

Parse Lexicon.xml, WordAnalyses.xml, and InterlinearSetup.xml into
models that mirror the file shapes alongside the existing interlinear
parser, as the first slice of the PT9 import pipeline.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 05cde228-89e2-40ff-85ae-a58fdffba011

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant