Skip to content
गाइड6 मिनट में पढ़ें

क़ानूनी दस्तावेज़ों के एनोटेशन के लिए बेहतर तरीक़े

Potato में क़ानूनी दस्तावेज़ एनोटेट कीजिए, अनुबंध, अदालती दस्तावेज़ और नियामक पाठ, span लेबलिंग, entity निकालने और निजता को पहले रखने वाली self-hosted तैनाती के साथ।

Potato Team

क़ानूनी पाठ एनोटेशन की अपनी अलग किस्म की समस्या है। ढाँचा घना होता है, शब्दावली विशेषज्ञों की है, और एक ग़लत लेबल के असली क़ानूनी नतीजे निकल सकते हैं। यह गाइड बताती है कि इसे ठीक से कैसे एनोटेट किया जाए।

क़ानूनी एनोटेशन मुश्किल क्यों है

अकेली शब्दावली ही इतनी है कि आपको प्रशिक्षित एनोटेटर चाहिए, यूँ ही चुने गए crowd worker नहीं। दस्तावेज़ लंबे होते हैं, अनुबंध कभी-कभी सैकड़ों पन्नों तक खिंच जाते हैं, और एक हिस्सा लगातार दूसरे हिस्सों की ओर इशारा करता रहता है। यहाँ सटीकता आम कामों से ज़्यादा मायने रखती है, क्योंकि ढीला-ढाला span किसी उपवाक्य का अर्थ ही बदल सकता है। और वह अर्थ काफ़ी हद तक दस्तावेज़ के प्रकार और क्षेत्राधिकार पर टिका होता है, इसलिए संदर्भ कभी वैकल्पिक नहीं होता।

इसके पीछे काम करने वाली span और टेक्स्ट एनोटेशन की व्यवस्था के लिए स्रोत दस्तावेज़ देखें।

दस्तावेज़ का विभाजन

लंबे दस्तावेज़ों को तोड़ना

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

क़ानूनी entity की पहचान

अनुबंधों की अपनी entity

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

एनोटेटर के दिशानिर्देश लिखना

क़ानूनी कार्य के अच्छे दिशानिर्देश दायरा साफ़ कर देते हैं (कौन से दस्तावेज़, कौन से क्षेत्राधिकार) और उनमें एक शब्दावली-सूची होती है, ताकि एनोटेटर शब्दों को उसी तरह पढ़ें जैसे आप पढ़ते हैं। दो अर्थ वाली भाषा के बारे में और इस बारे में साफ़ लिखिए कि किसी cross-reference को कब एनोटेट करना है और कब छोड़ देना है। यह भी बताइए कि span की सही सीमा किसे माना जाएगा, क्योंकि इस क्षेत्र में “लगभग सही” शायद ही कभी काफ़ी होता है।

बेहतर तरीक़े

ऐसे एनोटेटर लगाइए जो सचमुच इस क्षेत्र को जानते हों, क्योंकि उसके बिना क़ानूनी लेबलिंग चलती ही नहीं। लंबे दस्तावेज़ों को ऐसे हिस्सों में बाँटिए जिन्हें कोई एक बार में दिमाग़ में रख सके। जिस क़ानूनी भाषा का वज़न है उसे उभारकर दिखाइए, ताकि लोग उसे पढ़ते हुए फिसल न जाएँ। redundancy ऊँची रखिए, क्योंकि यहाँ ग़लती की क़ीमत ऊँची है। एक विशेषज्ञ समीक्षा की परत जोड़िए, जहाँ वकील किनारे के मामले सँभालें। हर लेबल की परिभाषा सटीक रखिए। और एनोटेटर को आसपास का ढाँचा तथा जुड़े हुए हिस्से दिखाइए, क्योंकि अकेला उपवाक्य भ्रम में डाल सकता है।


पूरे दस्तावेज़ एनोटेशन स्कीम पर हैं।