Repository navigation
Fix source-aware text conversion for dictionary and commentary APIs - #11
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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.