Skip to content

fix(generator): keep Otzaria links whose target Sefaria does not provide - #140

Merged
kdroidFilter merged 1 commit into
masterfrom
fix/otzaria-links-non-sefaria-targets
Oct 28, 2026
Merged

kdroidFilter merged 1 commit into
masterfrom
fix/otzaria-links-non-sefaria-targets

Conversation

@kdroidFilter

Copy link
Copy Markdown
Owner

Problem

Since #28 the generator skips all Otzaria links of a book imported from Sefaria. The goal was to drop Otzaria targum links that drifted one verse (Bereshit → Onkelos, where the headers differ). But the rule only looks at the source book, so it also drops links Sefaria has no equivalent for.

The main loss is the 17,980 links משנה ברורה → שער הציון that Otzaria aligned on the Sefaria text (tashmaToOtzaria/links/משנה ברורה_links.json). Because of this, שער הציון has 0 links in the DB.

Fix

  • Skip an Otzaria link only when both its source and its target come from Sefaria. In that case Sefaria already has the link, and it is exact.
  • Remove processLinkFile. It had no callers and duplicated processLinksForBook.

Links brought back

Counted on the link files of the current build:

Pair Links Check against the current DB
משנה ברורה → שער הציון 17,980 17,980 / 17,980 point to the right note; 17,801 land on the seif katan's own line, the rest on its continuation lines
חומש → תרגום ותפסיר רס"ג 5,845 5,845 / 5,845 point to the right verse (no such link exists today)
זוהר / זוהר חדש → ביאור הגר"א על תיקונים 75 not checked

Testing

  • :otzariasqlite:compileKotlinJvm and :otzariasqlite:jvmTest pass.
  • Not yet run: generateLinks on a full build.

Otzaria links were skipped for every book imported from Sefaria (#28), to
drop the targum links that drifted a verse on differing headers. That also
dropped links Sefaria has no equivalent for, like the 17,980 משנה ברורה →
שער הציון links Otzaria aligned on the Sefaria text.

Skip only links between two Sefaria books. This brings back ~23,900 links
(שער הציון, תרגום ותפסיר רס"ג, ביאור הגר"א on the Zohar), checked against
the current DB. Remove the unused processLinkFile duplicate.

Signed-off-by: Elie Gambache <elyahou.hadass@gmail.com>
@kdroidFilter
kdroidFilter merged commit 8d5b254 into master Oct 28, 2026
2 of 3 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant