Boas práticas para anotação de documentos jurídicos
Anote documentos jurídicos no Potato, contratos, peças processuais e textos regulatórios, com rotulagem de spans, extração de entidades e implantação auto-hospedada com privacidade em primeiro lugar.
Texto jurídico é um tipo de problema de anotação à parte. A estrutura é intrincada, o vocabulário é especializado e um rótulo errado pode ter consequências jurídicas reais. Este guia mostra como anotá-lo bem.
O que torna a anotação jurídica difícil
Só o jargão já significa que você precisa de anotadores treinados, não de trabalhadores de crowd escolhidos ao acaso. Os documentos são longos, com contratos às vezes chegando a centenas de páginas, e as seções remetem constantemente a outras seções. A precisão importa mais do que o normal, já que um span malfeito pode mudar o sentido de uma cláusula. E boa parte desse sentido depende do tipo de documento e da jurisdição, então o contexto nunca é opcional.
Para a mecânica subjacente de anotação de spans e de texto, veja a documentação de origem.
Segmentação de documentos
Dividindo documentos longos
{
"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"
}Anotação em nível de seção
instance_display:
fields:
- key: section_title
type: text
- key: text
type: textReconhecimento de entidades jurídicas
Entidades específicas de contratos
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"Detecção de obrigações
- 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
- BoilerplateClassificação de cláusulas
Tipos de cláusula contratual
- 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: 20Avaliação de risco
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"Anotação de documentos judiciais
Extração de informações do processo
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
Estrutura argumentativa
keyword_highlights_file: data/legal_terms.csvDestacando termos jurídicos
keyword_highlight_settings:
keyword_probability: 0.8 # show 80% of matched keywords
random_word_probability: 0.05 # highlight ~5% of other words as distractorsControle de qualidade para o jurídico
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: trueConfiguração completa de anotação jurídica
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_outputEscrevendo diretrizes para anotadores
Boas diretrizes para uma tarefa jurídica deixam claro o escopo (quais documentos, quais jurisdições) e incluem um glossário para que os anotadores leiam os termos do mesmo jeito que você. Seja explícito sobre a linguagem ambígua e sobre quando uma referência cruzada deve ser anotada ou ignorada. E diga o que conta como um limite de span correto, já que "perto o bastante" raramente serve neste domínio.
Boas práticas
Use anotadores que realmente conheçam o domínio, porque a rotulagem jurídica não funciona sem isso. Divida documentos longos em seções que as pessoas consigam guardar na cabeça. Destaque a linguagem jurídica que tem peso para que ninguém passe os olhos por cima dela. Mantenha a redundância alta, já que o custo de um erro é alto. Adicione uma camada de revisão por especialistas em que advogados cuidem dos casos limítrofes. Defina cada rótulo com precisão. E dê aos anotadores a estrutura ao redor e as seções relacionadas, porque uma cláusula isolada pode enganar.
Documentação completa em Esquemas de Anotação.