Skip to content

ספריא: קו מפריד לדיבור-המתחיל ב-12 מסכתות תוספות שמסיימות אותו בנקודה - #33

Merged
Y-PLONI merged 3 commits into
Otzaria:otzariafrom
palmoni5:fix/sefaria-dashless-dibburim
Sep 10, 2026
Merged

Y-PLONI merged 3 commits into
Otzaria:otzariafrom
palmoni5:fix/sefaria-dashless-dibburim

Conversation

@palmoni5

@palmoni5 palmoni5 commented Sep 9, 2026

Copy link
Copy Markdown
Member

הבעיה

פירושי התלמוד של ספריא מפרידים בין הדיבור לפירוש בקו מפריד מרווח (דיבור – פירוש), והקורא ואינדקס line_dh נשענים עליו. ב־12 מסכתות תוספות (בבא בתרא, מנחות, נדה, שבועות, סוכה, ראש השנה, מועד קטן, ביצה, חגיגה, תענית, מכות, הוריות) הדיבור מסתיים בנקודה: מאי שנא גבי סוכה דתני פסולה ומאי שנא גבי מבוי דתני תקנתא. והא דלא פריך… — לספרים האלה לא היו דיבורים כלל, והשורה נקראת כמשפט אחד רץ.

הפתרון (תיקון במקור)

SefariaDashlessDibburim.separate מחליף את ה־. הראשון בשורת תוכן של ספר מהרשימה ב־ כאשר המשפט הראשון הוא 1–12 מילים, ללא תגים, ואחריו טקסט. לפני ההחלפה המועמד נבדק גם באמצעות DhExtractor, כך שסמנים מבניים כגון מתני' ו־הג"ה אינם משתנים. שורה שכבר מכילה קו מפריד לא משתנה.

התיקון מופעל מיד אחרי cleanSefariaLine ב־SefariaBookPayloadReader, ולכן השורה מסומנת כ־modified לצורך עוגנים. מוני הסיכום מתאפסים בתחילת כל import ומסוכמים פר־ספר בסוף הייבוא.

אימות על נתונים

על /Users/david/Downloads/otzaria_latest/otzaria/seforim.db:

  • 5,532 שורות משתנות בפועל, וכל אחת מהן מתקבלת כדיבור על ידי DhExtractor.
  • שתי שורות מבניות שנמצאו בבבא בתרא (מתני'. … ו־(הג"ה. …) נשארות כעת ללא שינוי.
  • כל 12 המסכתות מזוהות כספרי DASH ב־buildLineDhIndex.
  • סוכה: 438 דיבורים; בבא בתרא: 1,295 (1,293 שתוקנו ועוד 2 שכבר הכילו מקף); מנחות: 1,045.

ספרי המאירי, תוספות הרא"ש על קידושין וריטב"א על מגילה שגם להם אין דיבורים נבדקו ואינם בתבנית זו — לא נכללו.

תאימות ובדיקות

הענף מוזג עם otzaria לאחר PR #28 (מפתחות שורה יציבים). מנגנון ה־legacy שומר את מזהי השורות הקיימים בבנייה הקרובה, והטיפול החדש ב־cleanedLineShift נשמר.

  • SefariaDashlessDibburimTest — 7 בדיקות, כולל רגרסיה על שתי השורות האמיתיות.
  • ./gradlew :sefariasqlite:jvmTest
  • ./gradlew build

🤖 Generated with Claude Code and reviewed/fixed with Codex

palmoni5 and others added 3 commits September 10, 2026 02:49
… end it with a period

Sefaria's Talmud commentaries separate the dibbur hamatchil from the comment with a spaced dash, and both the reader and the line_dh index rely on it. Twelve Tosafot volumes (Bava Batra, Menachot, Niddah, Shevuot, Sukkah, Rosh Hashanah, Moed Katan, Beitzah, Chagigah, Taanit, Makkot, Horayot) end the dibbur with a period instead, so they had no dibburim at all and read as one run-on sentence.

SefariaDashlessDibburim rewrites the first '. ' of a content line of those books to ' – ' when the first sentence is 1-12 words, carries no tag, and is followed by text; lines that already contain a spaced dash are untouched. 88-99% of each volume's content lines fit. Applied right after cleanSefariaLine in the payload reader (so the line is flagged as modified for anchor purposes) and summarised per book at the end of the import.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@Y-PLONI
Y-PLONI merged commit dde5821 into Otzaria:otzaria Sep 10, 2026
3 checks passed
@palmoni5
palmoni5 deleted the fix/sefaria-dashless-dibburim branch September 10, 2026 14:45
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.

2 participants