feat: replace 39 infringement cases with v3.0 18-item manuscript checklist
- data/taxonomy/cases_v3.0.json: 아카이빙DB v3.0 「2.원고점검체계18」 + 부록1-A 대표판례. 항목↔태그 매핑은 원문 표가 없어 tag_basis(명시/추정)로 구분 (추정 7항목은 컴북스 확인 대기) - 분류 후보를 엔진 판별 대상(M1·M2·M7·M10·P2)으로 한정 - admin detect 응답 case_candidates 에 matched_tags·reason·decision_steps·author_request 추가 (author 응답에서는 기존대로 제외) - /v1/taxonomy 에 항목별 판단 기준·판정 단계·문면·태그 근거 노출 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
7d985b4ec3
commit
12bb82a015
10 files changed
+757
-1006
No files matched your search
@@ -27,11 +27,10 @@ def test_taxonomy_loads_10_tags_and_cases():
|
||||
tax = load_taxonomy(ROOT / "data/taxonomy")
|
||||
assert tax is not None
|
||||
assert len(tax.meta_tags) == 10, f"PDF IV장: 10종 메타 태그 필요, 현재 {len(tax.meta_tags)}"
|
||||
# v1.3 IX장 총괄표 본문의 통계 줄은 "●16/○22 = 38"로 적혀 있으나 표를 실제로
|
||||
# 세면 ●19/○20 = 39 다. 표를 기준으로 고정한다.
|
||||
assert len(tax.cases) == 39, f"v1.3 IX장 총괄표: 39 케이스, 현재 {len(tax.cases)}"
|
||||
assert sum(c.detectable_internal for c in tax.cases) == 19
|
||||
assert sum(c.handling == "technical_detection" for c in tax.cases) == 19
|
||||
# 아카이빙DB v3.0 「2.원고점검체계18」. 엔진 판별 대상은 M1·M2·M7·M10·P2.
|
||||
assert len(tax.cases) == 18, f"v3.0 원고 점검 체계: 18항목, 현재 {len(tax.cases)}"
|
||||
assert {c.case_id for c in tax.cases if c.detectable_internal} == {"M1", "M2", "M7", "M10", "P2"}
|
||||
assert sum(c.handling == "technical_detection" for c in tax.cases) == 5
|
||||
|
||||
|
||||
def test_taxonomy_has_required_legal_tags():
|
||||
@@ -47,35 +46,34 @@ def test_taxonomy_has_required_legal_tags():
|
||||
|
||||
def test_taxonomy_case_groups():
|
||||
tax = load_taxonomy(ROOT / "data/taxonomy")
|
||||
groups = {c.case_id[0] for c in tax.cases}
|
||||
assert {"A", "B", "C", "D", "E", "X"}.issubset(groups)
|
||||
a_cases = [c for c in tax.cases if c.case_id.startswith("A")]
|
||||
assert len(a_cases) == 27, f"PDF: A그룹(저자 가해) 27건, 현재 {len(a_cases)}"
|
||||
counts = {g: sum(c.case_id.startswith(g) for c in tax.cases) for g in "MPR"}
|
||||
# 원고 점검 M 11(M3a·M3b 포함) · 출간·계약 P 4 · 출간 후 보호 R 3
|
||||
assert counts == {"M": 11, "P": 4, "R": 3}, counts
|
||||
|
||||
|
||||
def test_case_mapping_returns_full_tie_group_not_one_arbitrary_pick():
|
||||
"""reproduction+citation_missing 은 7개 케이스가 주/보조 태그까지 동일하다.
|
||||
"""복제권만 잡히면 M1(남의 글)과 M10(자기 글 재수록)이 동점이다.
|
||||
|
||||
하나만 고르면 나머지 6건이 결과에 영원히 등장하지 않으므로 동점군을 모두 낸다.
|
||||
둘은 작성자 관계로만 갈리므로 하나를 임의로 고르지 않고 동점군을 모두 낸다.
|
||||
"""
|
||||
tax = load_taxonomy(ROOT / "data/taxonomy")
|
||||
ids = [c.case_id for c in tax.find_cases(["reproduction", "citation_missing"])]
|
||||
assert set(ids) == {"A1", "A2", "A3", "A4", "A5", "A6", "A15"}, ids
|
||||
assert all(i.startswith("A") for i in ids)
|
||||
assert [c.case_id for c in tax.find_cases(["reproduction"])] == ["M1", "M10"]
|
||||
assert [c.case_id for c in tax.find_cases(["reproduction", "citation_missing"])] == ["M1"]
|
||||
|
||||
|
||||
def test_every_case_carries_v13_precedent_mapping():
|
||||
"""39건 전부가 대표판례를 갖거나, 없는 이유를 명시한다. 빈칸은 허용하지 않는다."""
|
||||
"""18항목 전부가 대표판례를 갖거나, 없는 이유를 명시한다. 빈칸은 허용하지 않는다."""
|
||||
tax = load_taxonomy(ROOT / "data/taxonomy")
|
||||
for c in tax.cases:
|
||||
assert c.representative_precedents or c.representative_precedent_note, c.case_id
|
||||
|
||||
|
||||
def test_high_risk_cases_marked():
|
||||
def test_draft_tag_mappings_are_marked():
|
||||
"""원문에 항목↔태그 표가 없어 초안으로 채운 7항목은 추정으로 표시돼야 한다."""
|
||||
tax = load_taxonomy(ROOT / "data/taxonomy")
|
||||
high_risk = [c for c in tax.cases if c.high_risk]
|
||||
# PDF IX-6: 가중 위험 9건 — A10, A13, A21, A22, A23, B3, B4, C3, D1
|
||||
assert len(high_risk) >= 7 # 본문에 high_risk=true 표시한 것 기준
|
||||
guessed = {c.case_id for c in tax.cases if c.tag_basis == "추정"}
|
||||
assert guessed == {"M3a", "M3b", "M4", "M5", "M6", "M10", "R1"}
|
||||
assert all(c.tag_basis in ("명시", "추정") for c in tax.cases)
|
||||
|
||||
|
||||
# ========== MinHash + LSH ==========
|
||||
|
||||
Reference in new issue
Block a user