Infotekmesin
Vol 17 No 2 (2026): Infotekmesin: Juli 2026

Text Extraction and Structurization of Indonesian Laws for Semantic and Relational Analysis

Muhammad Harist Murdani (Universitas Wijaya Putra)
Fikri Hadi (Universitas Wijaya Putra)



Article Info

Publish Date
31 Jul 2026

Abstract

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






Journal Info

Abbrev

infotekmesin

Publisher

Subject

Computer Science & IT Electrical & Electronics Engineering Mechanical Engineering

Description

INFOTEKMESIN is a peer-reviewed open-access journal with e-ISSN 2685-9858 and p-ISSN: 2087-1627 published by Pusat Penelitian dan Pengabdian Masyarakat (P3M) Politeknik Negeri Cilacap. The journal invites scientists and engineers to exchange and disseminate theoretical and practice-oriented in the ...