Structured Four-Stage Legal Translation
Structured Four-Stage Legal Translation: From Natural-Language Traffic Rules to PROLOG
For developers working on legal or safety-critical applications, this research provides a new framework that improves the accuracy of translating natural language into formal logic.
This study evaluates two baseline translation approaches, Natural Language to Prolog ($NL ightarrow Prolog$) and Logical English to Prolog ($LE ightarrow Prolog$), and introduces a new reasoning-guided translation framework called Structured Four-Stage Legal Translation ($S4L ightarrow Prolog$).
The proposed S4L framework performs semantic role extraction, scene completion, logical mapping, and Prolog rule generation within a single guided prompt, enabling direct translation of raw traffic rules into executable logic without human intervention.
A benchmark consisting of twenty real-world traffic rules was used to evaluate each approach in terms of syntactic validity, semantic correctness, and logical completeness.
$S4L ightarrow Prolog$ achieves the highest accuracy, correctly formalizing 75 percent of the rules, while $NL ightarrow Prolog$ reaches 60 percent and $LE ightarrow Prolog$ reaches 55 percent.
Structured Four-Stage Legal Translation: From Natural-Language Traffic Rules to PROLOG
Traffic regulations are written for human interpretation and therefore rely on shared background knowledge and flexible phrasing, which inherently introduce ambiguity, context dependence, and semantic underspecification. These linguistic characteristics conflict with the precision required by computational reasoning engines such as Prolog, which demand explicit logical structure. This study evaluates two baseline translation approaches, Natural Language to Prolog ($NL\rightarrow Prolog$) and Logical English to Prolog ($LE\rightarrow Prolog$), and introduces a new reasoning-guided translation framework called Structured Four-Stage Legal Translation ($S4L\rightarrow Prolog$). The proposed S4L framework performs semantic role extraction, scene completion, logical mapping, and Prolog rule generation within a single guided prompt, enabling direct translation of raw traffic rules into executable logic without human intervention. A benchmark consisting of twenty real-world traffic rules was used to evaluate each approach in terms of syntactic validity, semantic correctness, and logical completeness. $S4L\rightarrow Prolog$ achieves the highest accuracy, correctly formalizing 75 percent of the rules, while $NL\rightarrow Prolog$ reaches 60 percent and $LE\rightarrow Prolog$ reaches 55 percent. Qualitative analysis further shows that S4L captures implicit causal relations, deontic modality, and exception structure more reliably than the baselines. These results demonstrate that structured reasoning prompts can substantially improve the reliability of natural-language-to-logic translation for legal and safety-critical applications.
This report is categorized under AITOP's "Papers" desk, focusing on US frontier AI labs and Silicon Valley technology leaders. Within our cross-regional analytical framework, it directly maps to AI developer toolchains, coding agents, and engineering workflows. Key entities and technical topics under continuous tracking include Structured Four-Stage Legal Translation, Prolog, NLP.
Source attribution: curated from arXiv cs.AI (@May Myo Zin, Wachara Fungwacharakorn, Ken Satoh, Katsumi Nitta).