Skip to content

fix(sefariasqlite): link the whole Darkhei Moshe to the Tur through the Beit Yosef - #101

Merged
kdroidFilter merged 1 commit into
masterfrom
fix/darkhei-moshe-tur-links-462
Oct 8, 2026
Merged

kdroidFilter merged 1 commit into
masterfrom
fix/darkhei-moshe-tur-links-462

Conversation

@kdroidFilter

Copy link
Copy Markdown
Owner

Problem

When studying the Tur with its commentaries, only part of the Darkhei Moshe shows up (kdroidFilter/Zayit#462).

The Darkhei Moshe glosses the Beit Yosef and follows its seif numbering. Sefaria links a Darkhei Moshe seif to the Tur only when the Tur carries its own marker for it (about 2,000 of 6,000 seifim). The others are linked to the Beit Yosef seif they gloss. Checked against the live API: Darkhei Moshe, Orach Chayim 1:2 → Beit Yosef, Orach Chayim 1:2:1 only, and Tur OC 1 has Darkhei Moshe markers for 1.1 and 3.1 only.

Fix

After the links import, each Darkhei Moshe line without a Tur link gets a COMMENTARY link from the Tur lines its Beit Yosef seif is linked to (Darkhei Moshe → Beit Yosef → Tur).

  • Only Tur lines of the line's own siman are kept, so lateral citations of other simanim are not followed.
  • Later paragraphs of a seif share the seif's links.
  • Lines linked to neither book stay unlinked.

The commentary/intermediate/base triple is configured in SefariaSparseCommentaryLinks.kt.

Impact (simulated on the current DB)

Darkhei Moshe lines
already linked to the Tur 1,950
newly anchored through the Beit Yosef 3,889
still unlinked 177

Tests

SefariaSparseCommentaryLinksTest; the full :sefariasqlite:jvmTest suite passes.

Fixes kdroidFilter/Zayit#462

…he Beit Yosef

The Darkhei Moshe glosses the Beit Yosef and follows its seif numbering.
Sefaria links a Darkhei Moshe seif to the Tur only when the Tur carries its
own marker for it (about 2,000 of 6,000 seifim); the others are linked to
the Beit Yosef seif they gloss. So studying the Tur with its commentaries
showed only part of the Darkhei Moshe.

After the links import, anchor each Darkhei Moshe line without a Tur link
to the Tur lines its Beit Yosef seif is linked to, keeping only Tur lines
of its own siman so lateral citations are not followed. Lines linked to
neither book stay unlinked. On the current corpus: 3,889 lines anchored,
177 left unlinked.

Fixes kdroidFilter/Zayit#462

Signed-off-by: Elie Gambache <elyahou.hadass@gmail.com>
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.

Issue with Darkei Moshe

1 participant