Portuguese Legal Document PDF Metadata Extractor
About
MCP server for extracting metadata from Portuguese legal documents using advanced PDF processing and database architecture
Explore
- High Accuracy: 100% confidence score with 96.84% exact match rate
- Production Ready: Two extractor variants optimized for different use cases
- Robust Error Handling: Comprehensive validation and error recovery
- Flexible Confidence Scoring: Works with or without ground truth data
- User-Friendly Interface: Clear progress reporting and detailed feedback
- Field Classification: Distinguishes between missing and legitimately empty fields
- Python 3.8+
- Required packages:
pip install pdfplumber
The PortugueseLegalPDFExtractor class provides a user-friendly, production-ready interface:
```python
from production_extractor import PortugueseLegalPDFExtractor
A robust Python tool for extracting structured metadata from Portuguese legal document PDFs, specifically designed for European Case Law Identifier (ECLI) formatted documents.
π Features
- High Accuracy: 100% confidence score with 96.84% exact match rate
- Production Ready: Two extractor variants optimized for different use cases
- Robust Error Handling: Comprehensive validation and error recovery
- Flexible Confidence Scoring: Works with or without ground truth data
- User-Friendly Interface: Clear progress reporting and detailed feedback
- Field Classification: Distinguishes between missing and legitimately empty fields
π Project Structure
βββ production_extractor.py # Production-ready extractor with user-friendly interface
βββ robust_extractor.py # Core robust extraction engine
βββ run_test1.py # Test runner for batch processing
βββ ground_truth/ # Ground truth data for validation
β βββ ground_truth.json
βββ pdfs/ # Input PDF documents
β βββ test1/ # Test subset
β βββ *.pdf # Legal documents
βββ IMPROVEMENTS_SUMMARY.md # Performance improvements documentation
βββ README.md # This file
π§ Installation
Prerequisites
- Python 3.8+
- Required packages:
pip install pdfplumber
Setup
1. Clone or download the project files
2. Install dependencies:
pip install pdfplumber
3. Ensure your PDF files are in the
pdfs/ directory
π Usage
Basic Usage with Production Extractor
The PortugueseLegalPDFExtractor class provides a user-friendly, production-ready interface:
```python
from production_extractor import PortugueseLegalPDFExtractor
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



