AI-powered legal document recognition for the supreme court

AI-powered legal document recognition for the supreme court
  • Industry

    AI & ML

  • Location

    Netherlands

  • Platform

    Web

  • Cooperation

    1+ years

  • About the project

    A legal organization in the Netherlands required an AI-driven solution to process and analyze scanned legal documents. The goal was to build an AI-powered system that could accurately extract text, recognize complex elements like tables, graphs, and signatures, and generate structured legal summaries. 

    Challenge

    Challenge

    The main obstacle was the language — all documents were in Dutch. Additionally, they varied significantly in age and condition — some documents were centuries old, featuring damage, stains, and reconstructed sections, making using traditional OCR (Optical Character Recognition) solutions challenging.  

    Development process 

    Initially, our team proposed leveraging Microsoft Azure Document Intelligence, an API-based solution that allowed users to upload documents and receive structured JSON outputs with recognized content, including text positions in pixels and extracted data. The solution performed well during the Proof of Concept (PoC) phase, demonstrating high accuracy in text extraction. However, the client ultimately found the operational costs too high for large-scale implementation. 

    To address cost concerns, we developed an alternative offline solution using OpenCV (Open Computer Vision Library) deployed within a Dockerized Python environment. This system replicated the core functionality of the Azure solution but operated entirely on-premises, allowing the client to process documents without relying on costly API calls. The offline model successfully extracted: 

    • Text from both printed and handwritten documents 
    • Handwritten signatures with pattern recognition 
    • Watermarks and other security markings 

    After successfully implementing the OCR solution, the client requested an additional feature: the ability to generate legal case summaries from the extracted text. To meet this requirement, we initially integrated Microsoft Azure Text Summarizer, which allowed the client to customize summary length and format, choosing between extractive (verbatim excerpts) or abstractive (AI-generated summaries). 

    However, we encountered a key challenge — the Azure summarization model struggled with Dutch-language documents, reducing its effectiveness. To resolve this, we developed a custom Python-based PoC using ChatGPT, which provided significantly better summarization accuracy in Dutch. This approach enabled us to maintain the original front-end API structure, allowing seamless switching between Azure AI and OpenAI-powered summarization without disrupting the client’s workflow. The final implementation allowed the client to choose between different summarization techniques, ensuring both flexibility and cost control. 

    Technologies

    React React

    React

    Azure OpenAI Azure OpenAI

    OpenAI

    Cognitive Services Cognitive Services

    Cognitive Services

    Business value

    The delivered solution provided the client with a robust and scalable framework for automated legal document analysis. By offering two OCR processing options — Microsoft Azure and OpenCV — the client could balance cost and quality depending on their document volume and processing needs. Both solutions were integrated into a web application, enabling seamless document uploads and retrieval of structured data. 

    Additionally, the summarization component streamlined the review of lengthy legal documents, allowing legal professionals to extract key case insights in seconds rather than manually scanning entire texts. 

    Beyond document recognition and summarization, we also explored potential AI-driven anonymization solutions to ensure compliance with GDPR and the AI Act. While the client opted to use their existing anonymization tool, our system was designed to easily incorporate such functionality in future updates.
     
    With the ability to scale as needed, this AI-powered legal tech solution now plays a critical role in automating document review processes, enhancing productivity, and reducing manual workload for legal professionals in the Netherlands.

    Contact us

      Daryna Chorna

      Customer success manager