feat(chunker): הוספת דפוסי טענות לפסיקת בית-המשפט (parties_claims)
All checks were successful
G12 Leak-Guard / leak-guard (pull_request) Successful in 4s
Lint — undefined names / undefined-names (pull_request) Successful in 11s

פסקי-דין של ביהמ"ש העליון/מנהלי משתמשים בנוסחאות שונות מוועדת הערר:
- "טענות הצדדים" / "טיעוני הצדדים" — סוג חדש parties_claims
- "טיעוני המערערים/ת" — מוסף ל-appellant_claims
- "טיעוני המשיבים/ה" — מוסף ל-respondent_claims

parties_claims הוסף ל-NON_REASONING_SECTIONS בhalacha_extractor
כדי שלא יוזנו לחילוץ הלכות (בדיוק כמו appellant_claims/respondent_claims).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-17 17:17:00 +00:00
parent 93cd0f9553
commit 9618dc895b
2 changed files with 13 additions and 8 deletions

View File

@@ -22,18 +22,23 @@ from legal_mcp import config
# court rulings use slightly different vocabulary (פסק דין, נימוקים, סוף דבר). # court rulings use slightly different vocabulary (פסק דין, נימוקים, סוף דבר).
SECTION_PATTERNS = [ SECTION_PATTERNS = [
(r"רקע\s*עובדתי|רקע\s*כללי|העובדות|הרקע", "facts"), (r"רקע\s*עובדתי|רקע\s*כללי|העובדות|הרקע", "facts"),
# appellant_claims: covers singular (עורר/עוררת, מערער/מערערת) and plural # parties_claims: bilateral section common in Supreme Court / administrative
# (עוררים/עוררין, מערערים). Previously only plural was matched, so headers # court decisions ("טענות הצדדים", "טיעוני הצדדים"). Not split by side.
# like "טענות העורר:" were silently absorbed into the preceding section.
( (
r"(?:טענות|עיקר\s*טענות)\s*ה(?:עוררי[םן]|עורר[ת]?|מערערי[םן]|מערער[ת]?)", r"(?:טענות|טיעוני|עמדות)\s*הצדדים",
"parties_claims",
),
# appellant_claims: covers singular (עורר/עוררת, מערער/מערערת) and plural
# (עוררים/עוררין, מערערים), plus court-format verb "טיעוני".
(
r"(?:טענות|עיקר\s*טענות|טיעוני)\s*ה(?:עוררי[םן]|עורר[ת]?|מערערי[םן]|מערער[ת]?)",
"appellant_claims", "appellant_claims",
), ),
# respondent_claims: covers singular (משיב/משיבה) and plural (משיבים/משיבין), # respondent_claims: covers singular (משיב/משיבה) and plural (משיבים/משיבין),
# plus verb forms תשובת/תגובת. "טענות המשיבה:" (feminine singular) was the # plus verb forms תשובת/תגובת/טיעוני. "טענות המשיבה:" (feminine singular) was
# root cause of halacha 8181-21 index-11 being extracted from party claims. # the root cause of halacha 8181-21 index-11 being extracted from party claims.
( (
r"(?:טענות|תשובת|תגובת|עיקר\s*טענות)\s*ה(?:משיבי[םן]|משיב[ה]?)", r"(?:טענות|תשובת|תגובת|עיקר\s*טענות|טיעוני)\s*ה(?:משיבי[םן]|משיב[ה]?)",
"respondent_claims", "respondent_claims",
), ),
(r"דיון\s*והכרעה|דיון|הכרעה|ניתוח\s*משפטי|המסגרת\s*המשפטית|נימוקים", "legal_analysis"), (r"דיון\s*והכרעה|דיון|הכרעה|ניתוח\s*משפטי|המסגרת\s*המשפטית|נימוקים", "legal_analysis"),

View File

@@ -101,7 +101,7 @@ EXTRACTABLE_SECTIONS = ("legal_analysis", "ruling", "conclusion")
# reasoning that merely landed under 'other' is still reached. Raises precision # reasoning that merely landed under 'other' is still reached. Raises precision
# on the dominant Facts↔Reasoning confusion class (#81.6; INV-LRN2 # on the dominant Facts↔Reasoning confusion class (#81.6; INV-LRN2
# quality-at-source; LegalSeg / rhetorical-role labeling). # quality-at-source; LegalSeg / rhetorical-role labeling).
NON_REASONING_SECTIONS = ("facts", "appellant_claims", "respondent_claims", "intro") NON_REASONING_SECTIONS = ("facts", "appellant_claims", "respondent_claims", "parties_claims", "intro")
# Two prompts — choose by source's is_binding flag. # Two prompts — choose by source's is_binding flag.