The legal fiction principle requires all regulations to be publicly available. Yet text-based search often fails when a question depends on how documents relate, such as which regulation amends or revokes another, because those relationships are not represented explicitly.

LexID addresses this with a knowledge graph holding both legal metadata and the semantic content of articles, modelled with the LexID ontology. Because Indonesian regulations follow a fixed drafting procedure, the graph is built with a rule-based approach from thousands of legal documents.

Evaluated on question answering, LexID reaches a macro-average F1 score of about 0.91. The paper is published in the Jurnal Ilmu Komputer dan Informasi (JIKI).

Example SPARQL queries on the LexID knowledge graph and their answers: the legal basis of Maluku Provincial Regulation No. 12 of 2008 (left) and the chapters it contains (right).
LexID dataset on GitHub
SourcesRead at JIKI (makalah lengkap)