Natural Language Processing | Generative AI
Lex: AI Legal Document Analyser
An AI-powered legal document analyser combining OCR, multilingual translation and LLM-based processing.
- Python
- OCR (PaddleOCR)
- NLLB
- Llama 3.2
- Natural Language Processing
- pytest
Reads scanned legal documents, splits them into individual clauses, classifies each clause's risk level and can explain the result in plain English or Urdu.
- Scanned document
- OCR text extraction
- Clause splitting (rule-based NLP)
- Risk classification (Llama 3.2)
- Plain-English explanation, optional Urdu translation
- Models were chosen through structured comparison testing at each pipeline stage: OCR, classification and translation.
- Translation accuracy was checked with native-speaker verification.
- Validated with 36+ automated tests (pytest).