ספריא: קו מפריד לדיבור-המתחיל ב-12 מסכתות תוספות שמסיימות אותו בנקודה - #33
Merged
Merged
Conversation
… 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>
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.
הבעיה
פירושי התלמוד של ספריא מפרידים בין הדיבור לפירוש בקו מפריד מרווח (
דיבור – פירוש), והקורא ואינדקסline_dhנשענים עליו. ב־12 מסכתות תוספות (בבא בתרא, מנחות, נדה, שבועות, סוכה, ראש השנה, מועד קטן, ביצה, חגיגה, תענית, מכות, הוריות) הדיבור מסתיים בנקודה:מאי שנא גבי סוכה דתני פסולה ומאי שנא גבי מבוי דתני תקנתא. והא דלא פריך…— לספרים האלה לא היו דיבורים כלל, והשורה נקראת כמשפט אחד רץ.הפתרון (תיקון במקור)
SefariaDashlessDibburim.separateמחליף את ה־.הראשון בשורת תוכן של ספר מהרשימה ב־–כאשר המשפט הראשון הוא 1–12 מילים, ללא תגים, ואחריו טקסט. לפני ההחלפה המועמד נבדק גם באמצעותDhExtractor, כך שסמנים מבניים כגוןמתני'ו־הג"האינם משתנים. שורה שכבר מכילה קו מפריד לא משתנה.התיקון מופעל מיד אחרי
cleanSefariaLineב־SefariaBookPayloadReader, ולכן השורה מסומנת כ־modified לצורך עוגנים. מוני הסיכום מתאפסים בתחילת כל import ומסוכמים פר־ספר בסוף הייבוא.אימות על נתונים
על
/Users/david/Downloads/otzaria_latest/otzaria/seforim.db:DhExtractor.מתני'. …ו־(הג"ה. …) נשארות כעת ללא שינוי.buildLineDhIndex.ספרי המאירי, תוספות הרא"ש על קידושין וריטב"א על מגילה שגם להם אין דיבורים נבדקו ואינם בתבנית זו — לא נכללו.
תאימות ובדיקות
הענף מוזג עם
otzariaלאחר PR #28 (מפתחות שורה יציבים). מנגנון ה־legacy שומר את מזהי השורות הקיימים בבנייה הקרובה, והטיפול החדש ב־cleanedLineShiftנשמר.SefariaDashlessDibburimTest— 7 בדיקות, כולל רגרסיה על שתי השורות האמיתיות../gradlew :sefariasqlite:jvmTest./gradlew build🤖 Generated with Claude Code and reviewed/fixed with Codex