Lawrean Kompa is a document comparison tool designed to analyze two versions of a commercial offer PDF and identify meaningful changes between them. It extracts structured information from the documents, matches corresponding line items, compares quantities, prices, totals, delivery details, and other commercial information, and presents the differences with references back to the source documents.
Completed
Lawrean Kompa
A browser-based prototype for comparing two versions of a commercial offer PDF and identifying substantive changes, discrepancies, and supporting source evidence.
React, Vite, JavaScript, CSS, Python, FastAPI, PyMuPDF, FastEmbed, NumPy
OVERVIEW
THE PROBLEM
Comparing revised commercial offer documents manually can make it difficult to identify every changed line item, price, quantity, total, or other important commercial detail. Small changes can easily be overlooked, especially when items are reordered or described differently between document versions.
THE SOLUTION
Lawrean Kompa automates the comparison process by extracting information from both PDF versions, matching corresponding line items, comparing their values, recalculating totals, and presenting detected changes together with source evidence from the original documents.
FEATURES
→ PDF document comparison
→ Structured PDF extraction
→ Line-item matching
→ Semantic matching
→ Quantity and price comparison
→ Total recalculation
→ Arithmetic discrepancy detection
→ Source evidence references
→ Uncertain-match handling
→ Automated testing
DEVELOPMENT
The system was developed with a React and Vite frontend connected to a FastAPI backend. PDF documents are processed with PyMuPDF, while semantic matching helps identify corresponding line items even when their names or ordering differ. Deterministic calculations and comparison logic are then used to verify quantities, prices, totals, and other commercial changes.
RESULT
A working document comparison tool that can analyze commercial offer revisions, identify expected changes, flag discrepancies, and provide traceable source references for its findings.