Skip to content

fix(sefariasqlite): stop labelling Mishnah Berurah segments - #102

Merged
kdroidFilter merged 1 commit into
masterfrom
fix/mishnah-berurah-segment-labels-74
Oct 8, 2026
Merged

kdroidFilter merged 1 commit into
masterfrom
fix/mishnah-berurah-segment-labels-74

Conversation

@kdroidFilter

Copy link
Copy Markdown
Owner

Problem

Sefaria's Mishnah Berurah segments already start with their printed seif katan marker, so the generated (letter) label:

Fix

  • SefariaImportText.kt: list of books whose segments carry their own marker (only Mishnah Berurah; elsewhere a leading (…) is קרי/כתיב, (ליקוט), (סעיף ה)… so no text heuristic), plus normalization of a leading {א} to (א).
  • SefariaBookPayloadReader.kt: skip the generated label for those books and apply the normalization.
  • SefariaSelfLabeledSegmentsTest: covers the book and a control book that still gets labels.

ID stability

Sefaria line ids are keyed on REF:+heRef, which this change doesn't touch. Running the reader on the 2026-10-07 export vs the current DB: same 18,119 lines, 0 heRef differences — the delta only upserts the content of ~17.4k Mishnah Berurah lines. No doubled marker or leading { left.

Fixes #74
Fixes #73

Sefaria's Mishnah Berurah segments already open with their printed seif
katan marker, so the generated "(letter) " label doubled it ("(יד) (יד)
נהגו לתייג"), and gave fake numbers to the kuntresim that have none
(Mishnat Soferim in siman 36: "(טז) משנת סופרים", "(יז) תפילין...").
Simanim 494-529 mark the seif katan as "{א}", which read "(א) {א}".

Skip the generated label for this book and normalize a leading "{א}" to
"(א)". Line ids are unaffected: Sefaria lines are keyed on their heRef,
which is unchanged. Checked against the 2026-10-07 export: same 18,119
lines, no heRef difference, no doubled marker left.

Fixes #74
Fixes #73

Signed-off-by: Elie Gambache <elyahou.hadass@gmail.com>
@kdroidFilter
kdroidFilter merged commit 2a68862 into master Oct 8, 2026
1 check passed
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