ガイド6分で読めます
法律文書アノテーションのベストプラクティス
契約書、裁判文書、規制関連書類をドメイン専門知識を活かしてアノテーションするための専門的テクニック。
Potato Team
法律文書は、複雑な構造、専門用語、エラーがもたらす重大な影響のため、特殊なアノテーションアプローチが必要です。本ガイドでは、効果的な法律テキストアノテーションのための戦略を紹介します。
法律アノテーションの課題
- 専門用語の多さ: 法律用語には訓練を受けたアノテーターが必要
- 長文書: 契約書は数百ページに及ぶことがある
- 相互参照: セクション間の相互参照が存在する
- 高精度の要求: エラーは法的な影響をもたらす可能性がある
- 文脈依存性: 意味は文書の種類や管轄区域によって異なる
文書の分割
長文書の分割
json
{
"id": "contract_001_section_3.2",
"text": "The Licensor grants to the Licensee a non-exclusive, non-transferable license...",
"section_number": "3.2",
"section_title": "License Grant",
"document_id": "contract_001"
}セクションレベルのアノテーション
yaml
instance_display:
fields:
- key: section_title
type: text
- key: text
type: text法律エンティティの認識
契約書固有のエンティティ
yaml
annotation_schemes:
- annotation_type: span
name: legal_entities
description: "Mark the parties, defined terms, dates, amounts and obligations."
labels:
- name: PARTY
color: "#FECACA"
tooltip: "Contracting parties, including Licensor, Licensee and named companies"
- name: DEFINED_TERM
color: "#FDE68A"
tooltip: "A term given a specific meaning by the definitions section"
- name: DATE
color: "#BBF7D0"
tooltip: "Dates and time periods, including notice and cure periods"
- name: MONETARY
color: "#C4B5FD"
tooltip: "Amounts, fees, penalties and caps"
- name: OBLIGATION
color: "#BFDBFE"
tooltip: "Language creating a duty, such as shall, must or agrees to"
- name: CONDITION
color: "#FED7AA"
tooltip: "Language making a duty conditional, such as if, unless or provided that"
- name: REFERENCE
color: "#E0E7FF"
tooltip: "A cross-reference to another section or document"義務の検出
yaml
- annotation_type: radio
name: clause_type
description: "What type of clause is this?"
labels:
- Definitions
- Grant of rights
- Consideration and payment
- Term and termination
- Representations and warranties
- Indemnification
- Limitation of liability
- Confidentiality
- Intellectual property
- Dispute resolution
- Boilerplate条項の分類
契約条項の種類
yaml
- annotation_type: multiselect
name: obligation_type
description: "Which kinds of obligation does this clause create?"
labels:
- Performance
- Payment
- Restriction
- Conditional obligation
- Warranty
- annotation_type: likert
name: risk
description: "How much risk does this clause carry for the receiving party?"
size: 5
min_label: "Low risk"
max_label: "High risk"
- annotation_type: text
name: risk_notes
description: "Explain the risk factors you identified."
rows: 4
min_chars: 20リスク評価
yaml
annotation_schemes:
- annotation_type: span
name: case_entities
description: "Mark case metadata and the parties to the proceeding."
labels:
- name: CASE_NUMBER
tooltip: "The docket or case identifier"
- name: COURT
tooltip: "Court name and jurisdiction"
- name: JUDGE
- name: PLAINTIFF
- name: DEFENDANT
- name: ATTORNEY
- name: LEGAL_CITATION
tooltip: "Citations to cases, statutes and regulations"
- name: RULING
- annotation_type: span
name: argument_structure
description: "Mark the claim, its support, and the court's conclusion."
labels:
- name: CLAIM
color: "#FECACA"
- name: PREMISE
color: "#BBF7D0"
- name: EVIDENCE
color: "#BFDBFE"
- name: REBUTTAL
color: "#FED7AA"
- name: CONCLUSION
color: "#E0E7FF"裁判文書のアノテーション
訴訟情報の抽出
text
keyword,label,schema,color
shall,OBLIGATION,legal_entities,#FEE2E2
must,OBLIGATION,legal_entities,#FEE2E2
agrees to,OBLIGATION,legal_entities,#FEE2E2
may,permission,legal_entities,#D1FAE5
unless,CONDITION,legal_entities,#DBEAFE
provided that,CONDITION,legal_entities,#DBEAFE
notwithstand*,CONDITION,legal_entities,#DBEAFE
論証構造
yaml
keyword_highlights_file: data/legal_terms.csv法律用語のハイライト
yaml
keyword_highlight_settings:
keyword_probability: 0.8 # show 80% of matched keywords
random_word_probability: 0.05 # highlight ~5% of other words as distractors法律分野の品質管理
yaml
num_annotators_per_item: 3
gold_standards:
enabled: true
items_file: data/gold_clauses.json
mode: mixed
frequency: 20
accuracy:
min_threshold: 0.85
evaluation_count: 10
feedback:
show_correct_answer: true
show_explanation: true完全な法律アノテーション設定
yaml
annotation_task_name: "Contract Clause Analysis"
task_description: "Classify contract clauses and mark the entities they refer to."
data_files:
- data/contract_sections.json
item_properties:
id_key: id
text_key: text
instance_display:
fields:
- key: section_title
type: text
- key: text
type: text
annotation_schemes:
- annotation_type: radio
name: clause_type
description: "What type of clause is this?"
labels:
- Grant of rights
- Consideration and payment
- Term and termination
- Indemnification
- Limitation of liability
- Confidentiality
- Other
- annotation_type: span
name: legal_entities
description: "Mark the parties, defined terms, dates, amounts and obligations."
labels:
- name: PARTY
color: "#FECACA"
- name: DEFINED_TERM
color: "#FDE68A"
- name: MONETARY
color: "#C4B5FD"
- name: DATE
color: "#BBF7D0"
- name: OBLIGATION
color: "#BFDBFE"
- annotation_type: likert
name: risk
description: "How much risk does this clause carry for the receiving party?"
size: 5
min_label: "Low risk"
max_label: "High risk"
- annotation_type: text
name: issues
description: "Note any unusual or problematic language."
rows: 4
min_chars: 20
num_annotators_per_item: 3
gold_standards:
enabled: true
items_file: data/gold_clauses.json
mode: mixed
frequency: 20
accuracy:
min_threshold: 0.85
evaluation_count: 10
agreement_metrics:
enabled: true
min_overlap: 2
output_annotation_dir: annotation_outputアノテーターガイドラインの例
法律アノテーションのガイドラインを作成する際のポイント:
- 範囲の定義: 対象文書、対象管轄区域を明確にする
- 用語集: アノテーター向けに法律用語を定義する
- 境界ケース: 曖昧な表現の取り扱い方法
- 相互参照: 参照をアノテーションするか無視するかの基準
- 精度要件: スパン境界の正確さ
ベストプラクティス
- 訓練を受けたアノテーターを使用する: 法律アノテーションにはドメイン知識が必要
- 長文書を分割する: 管理しやすいセクションに分割する
- 重要な用語をハイライトする: 法律用語への注意を促す
- 高い冗長性: 法律上のエラーはコストが大きい
- 専門家レビュー層: 境界ケースについて弁護士のレビューを受ける
- 明確なガイドライン: 各ラベルの意味を正確に定義する
- 文脈に基づくアノテーション: 文書構造と関連セクションを表示する
詳細なドキュメントはアノテーションスキームをご覧ください。