Skip to content

Fix source-aware text conversion for dictionary and commentary APIs - #11

Merged
Llewellynvdm merged 1 commit into
mainfrom
fix/source-aware-study-text
Oct 9, 2026
Merged

Llewellynvdm merged 1 commit into
mainfrom
fix/source-aware-study-text

Conversation

@Llewellynvdm

@Llewellynvdm Llewellynvdm commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

The builder currently relies on SWORD's stripped projection for TEI and OSIS. That can discard line boundaries and numeric character references before dictionary and commentary text reaches JSON. Already-plain text is also HTML-unescaped again, which can change literal entity-like examples.

This change projects verified TEI and OSIS source through format-aware text readers, alongside the existing ThML reader. It preserves structural boundaries, notes, labels, Unicode, and word annotations; decodes XML entities once, including attributes; and aligns scripture-reference extraction with the visible text. Namespace-prefixed references are retained, while literal CDATA examples and hidden metadata do not create false references. Meaningful source content that would otherwise disappear produces a module diagnostic.

The v1 schemas, paths, identifiers, aliases, repeated-key suffixes, reference shapes, and complete-download structure remain unchanged. Both API writers use the same conversion path. Source wording is preserved without entry-specific replacements or language filters.

Validation:

  • 351 tests passed locally, including new TEI/OSIS coverage through both complete API writers.
  • Ruff checks and formatting passed.
  • Independent targeted review and 110 content/reference tests passed.
  • Test Builder: passed.
  • Crosswire Corpus: 9/9 module builds and API validations passed.
  • Get Bible Sword: 6/6 binary smoke builds and API validations passed.
  • Together the two real-package matrices cover all 12 distinct modules: Clarke, Easton, FreAug, FreChry, Luther, MHCC, Sentiment, StrongsGreek, StrongsHebrew, TSK, VarApp, and VulgGlossa.

Scope: this repairs demonstrated conversion defects. The tested StrongsGreek 2.0 package contains literal Chinese wording in its raw source (including G3739); that source wording remains. This change does not translate or remove source content. No generated API repositories are published by this PR.

Project validated TEI and OSIS source into the existing v1 text fields,
preserving structural breaks and decoding XML entities exactly once.
Align reference extraction and verify dictionary/commentary composition.
@Llewellynvdm
Llewellynvdm marked this pull request as ready for review October 9, 2026 16:19
@Llewellynvdm
Llewellynvdm merged commit ea2af64 into main Oct 9, 2026
16 checks passed
@Llewellynvdm
Llewellynvdm deleted the fix/source-aware-study-text branch October 9, 2026 18:43
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