Indonesia is struggling with too many overlapping laws which is reflected in the number of judicial review cases the Constitutional and Supreme Court received. There is a need to develop a more systematic way to analyze legal reasoning. This study suggests a tech-driven framework for digital laws, which could help with national legal reforms in line with SDG 16. This study compares Tesseract OCR, PyMuPDF and the Gemini API to extract text from PDFs. Gemini API accuracy tops other methods, thus it is used for the rest of study. Then the text is cleaned and turned into structured JSON which gets plugged into ChromaDB for analyzing semantic similarities and ArangoDB for mapping out legal relationships. The result is a machine-readable version of Indonesian laws. The whole approach shows a scalable method for taking complex legal documents and turning them into a structured knowledge base. The experimental results demonstrate that the Gemini API significantly outperforms conventional methods, achieving 97% text accuracy, 95% structural accuracy, and only 3% Word Error Rate, compared to 78% and 90% for Tesseract and PyMuPDF, respectively.
Copyrights © 2026