feat: expand infringement case matching to v1.3 precedent mapping
태그 동점 시 첫 케이스만 반환해 나머지를 버리던 문제를 고친다. A1·A2·A3·A4·A5·A6·A15 는 주/보조 태그가 동일하고 실제 구별자는 원본의 종류라 태그로 좁혀지지 않는다. find_case -> find_cases 로 바꿔 동점군을 전부 내보내고, 확정은 사람이 원본 종류로 한다. - cases_v1.3.json 신설(v1.2 삭제): 39건 전부에 대표판례·처리구분(●/○) 적재. 판례 미지정 10건은 사유를 값으로 남긴다. - detectable_internal 10 -> 19건 (v1.3 IX장 총괄표 ● 기준으로 정정) - _assign_tags 주 태그 조합 3 -> 5종. 유사도로 판단 가능한 쟁점만 주 태그로 낸다. 도달 케이스 3 -> 16건(● 19건 중). - B3·C1·D1 은 게재 사실·편집 개입·성명표시가 필요해 텍스트로 알 수 없다. 추측하지 않고 LegalContext 대기로 두며 경계를 테스트로 고정한다. - 케이스 수 검증을 38~39 범위에서 39 로 고정. v1.3 본문 통계 줄(●16/○22=38)이 같은 문서의 표(●19/○20=39)와 어긋난 것이 38/39 혼재의 원인이었다. - docs/PRECEDENT_SOURCE_GAP.md: 대표판례이나 적재본에 없어 출처를 제시할 수 없는 14건. 응답에서도 precedents_without_source 로 구분한다. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
aaabbdd8c6
commit
52a0fdcdf0
10 files changed
+1120
-133
No files matched your search
@@ -80,6 +80,12 @@ async def taxonomy(request: Request) -> TaxonomyResponse:
|
||||
],
|
||||
cases=[
|
||||
{"case_id": c.case_id, "old_no": c.old_no, "subgroup": c.subgroup,
|
||||
"handling": c.handling,
|
||||
"representative_precedents": [
|
||||
{"case_id": p.case_id, "in_runtime_corpus": p.in_runtime_corpus}
|
||||
for p in c.representative_precedents
|
||||
],
|
||||
"representative_precedent_note": c.representative_precedent_note,
|
||||
"title": c.title, "actor": c.actor,
|
||||
"primary_tags": list(c.primary_tags), "secondary_tags": list(c.secondary_tags),
|
||||
"detectable_internal": c.detectable_internal, "high_risk": c.high_risk,
|
||||
|
||||
@@ -122,6 +122,21 @@ class PartialPlagiarismSignal(BaseModel):
|
||||
changed_elements: list[str] = Field(default_factory=list) # 바꿔치기한 요소
|
||||
|
||||
|
||||
class CaseCandidate(BaseModel):
|
||||
"""판정된 침해 케이스 후보 1건 + v1.3 총괄표의 대표판례."""
|
||||
case_id: str
|
||||
title: str
|
||||
handling: Literal["technical_detection", "terms_or_report"]
|
||||
representative_precedents: list[str] = Field(default_factory=list)
|
||||
precedents_without_source: list[str] = Field(
|
||||
default_factory=list,
|
||||
description="대표판례이나 운영 적재본에 없어 출처를 제시할 수 없는 사건번호.",
|
||||
)
|
||||
precedent_note: str | None = Field(
|
||||
default=None, description="대표판례 미지정 사유 (예: '확립 판례 없음').",
|
||||
)
|
||||
|
||||
|
||||
class MatchResult(BaseModel):
|
||||
source_doc: str
|
||||
source_title: str | None = None
|
||||
@@ -129,6 +144,11 @@ class MatchResult(BaseModel):
|
||||
tags: list[InfringementTag] = Field(default_factory=list)
|
||||
case_id: str | None = None
|
||||
case_title: str | None = None
|
||||
case_candidates: list[CaseCandidate] = Field(
|
||||
default_factory=list,
|
||||
description="태그 동점 케이스 전부. 원본 종류(가사·기사·위키·교재 등)로 "
|
||||
"사람이 확정한다. case_id 는 이 목록의 첫 항목이다.",
|
||||
)
|
||||
infringement_type: InfringementType = "unknown"
|
||||
evidence_spans: list[EvidenceSpan] = Field(default_factory=list)
|
||||
score_breakdown: ScoreBreakdown | None = None
|
||||
|
||||
Reference in new issue
Block a user