Add claim_type field: distinguish claims vs responses vs replies
Legal documents have 3 types of assertions: - claim: from appeal documents (כתב ערר) - response: from original responses (כתב תשובה) - reply: from supplementary responses (תגובה, השלמת טיעון) DB: added claim_type column to claims table Extractor: _infer_claim_type() auto-detects from doc_type + title Updated existing 113 records: 29 claims, 28 responses, 56 replies Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -572,14 +572,15 @@ async def store_claims(case_id: UUID, claims: list[dict], source_document: str =
|
||||
)
|
||||
for claim in claims:
|
||||
await conn.execute(
|
||||
"""INSERT INTO claims (case_id, party_role, party_name, claim_text, claim_index, source_document)
|
||||
VALUES ($1, $2, $3, $4, $5, $6)""",
|
||||
"""INSERT INTO claims (case_id, party_role, party_name, claim_text, claim_index, source_document, claim_type)
|
||||
VALUES ($1, $2, $3, $4, $5, $6, $7)""",
|
||||
case_id,
|
||||
claim["party_role"],
|
||||
claim.get("party_name", ""),
|
||||
claim["claim_text"],
|
||||
claim.get("claim_index", 0),
|
||||
source_document,
|
||||
claim.get("claim_type", "claim"),
|
||||
)
|
||||
return len(claims)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user