Files
Liti-agent-Development/요건사실론/plans/extract-remaining-elements/agent1_polish.py
T
jhogyuandClaude Fable 5.1 5f9853e44b chore: snapshot of work since 2026-10-05 (Stage 1 v.8, S2_00 v7.4/v7.5 handoff, S2_10 rewrite research v.2, 청구취지·요건사실 corpora)
Case_02_Comparison_Research
- Stage 1 v.8: Part 1~4 YAMLs with R1~R3 patches, F-1/F-2 fixes, 피고과식별방지 prompt
  (defendant_qualification), dated backups, 실행검사/실패분석 reports
- Stage 2 S2_00: v7.4 handoff (Task_S2_00_handoff, 경량화 전략서 + §2 개정) and
  v7.5 defendant qualification gate (피고관련작업_개정_S2_00.md), copies v.7/v.10/v.11,
  dated backups, 실행보고서/실패분석/결과물 리스트
- Stage 2 S2_10: v6/v7/v8 failure analyses, 재작성전략 10_06/10_08, case_kind_registry.json,
  연구조사보고서_S2_10_재작성용.md (v.1), _추가.md (multi-claim methodology) and
  merged _v.2.md (claims[] 1~4, join PRELIMINARY/SELECTIVE/INDEPENDENT, V1~V6),
  S2_10_Test run outputs, 실행검사 v.10/v.11
- Stage_2 MEMORY.md / CLAUDE.md / work-history notes, AGENTS.md and README_KO.md updates

Other corpora and tooling
- Default_Agent_청구취지기재방법: 청구취지 규칙문서 전체 모음(원문·사건종류별·raw) and tmp drafts
- 요건사실론: 사건종류별 문서(raw·filtered), plans, rf_draft
- 판례모음, STT_앱구성_연구, API Crowdness 조사, update_numbers.py

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-12 13:02:13 +09:00

32 lines
2.4 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import json,pathlib,re
B=json.load(open('plans/extract-remaining-elements/batch_1.json'))
for r in B:
p=pathlib.Path(r['output']);s=p.read_text()
s=s.replace('### 8.4 증명 곤란','## §8.4 증명책임·추정의 적용 한계').replace('### 12.6 학설','## §12.6 요건 분류에 영향을 주는 견해 차이')
s=s.replace('### 10.4 청구취지','## §10.4 청구취지 특정 보충')
s=re.sub(r'\((?:검증 문서|검증보고서) 4절(?: 반영)?\)','',s)
s=s.replace('; 검증 문서 4절','').replace('검증 문서 4절; 기존 ','원문 반영: ')
# Convert review-history lead paragraphs to the substantive qualification only.
s=re.sub(r'^UNVERIFIED — R3:.*$', 'UNVERIFIED — 동일성 침해, 주등기의 유효 존속, 피고가 등기의무자·등기명의인이 아닌 경우의 각하/기각 경계에는 미해결 사항이 남는다.',s,flags=re.M)
s=re.sub(r'^UNVERIFIED — R2:.*$', 'UNVERIFIED — 주등기 자체의 원인무효에 대한 공방상 성질·증명책임 및 실체관계 부합 항변의 요건 배열에는 유보가 남는다.',s,flags=re.M)
s=s.replace('검증 문서 4절에 따라 ','원문은 ').replace('검증 문서 4절에 따라, ','원문은 ')
# Drop purely illustrative evidence inventory sentences while retaining all operative legal sentences.
out=[]
for ln in s.splitlines():
m=re.match(r'^- \*\*증명 실무\*\*\s*[::]\s*(.*)',ln)
if m:
parts=re.split(r'(?<=다\.)\s+|(?<=증\.)\s+',m[1]);kept=[]
for part in parts:
pure=bool(re.search(r'^(?:계약서|등기사항증명서|등기부|입금|송금|통장|진단서|의사록|약정서|신고서|어업권원부|급여명세서|청구서|운송장|문자메시지|내용증명|영수증|취업규칙)',part))
operative=bool(re.search(r'경우|단서|요건|추정|전환|한정|효력|권리|의무|책임|다만|기간|기산|항변|원고|피고|갈린|달라|성립|구별|UNVERIFIED|UNKNOWN|QUALIFIED',part))
if pure and not operative and re.search(r'전형|증거|제시|확인|증명|서류|내역|자료',part):continue
kept.append(part)
if not kept:continue
ln='- **추정·입증 적용 설명**: '+' '.join(kept)
out.append(ln)
s='\n'.join(out)+'\n'
# Remove empty template-only headings after extraction.
# Keep empty structural headings because they carry route and section identities.
s=re.sub(r'\n{3,}','\n\n',s)
p.write_text(s)