发表机构
Center for Juris-Informatics, ROIS-DS(法信息学中心,ROIS-DS)
机构由 AI 辅助整理,请以论文原文为准。AI 中文总结
本研究提出结构化四阶段法律翻译框架S4L,将自然语言交通规则直接转换为Prolog逻辑,在20条规则基准上以75%准确率优于基线方法,显著提升法律文本形式化的可靠性。
AI 中文摘要
交通法规是为人类理解而编写的,因此依赖于共享的背景知识和灵活的措辞,这固有地引入了歧义、上下文依赖性和语义欠明确性。这些语言特征与Prolog等计算推理引擎所需的精确性相冲突,后者要求明确的逻辑结构。本研究评估了两种基线翻译方法,即自然语言到Prolog($NL\ ightarrow Prolog$)和逻辑英语到Prolog($LE\ ightarrow Prolog$),并引入了一种新的推理引导翻译框架,称为结构化四阶段法律翻译($S4L\ ightarrow Prolog$)。所提出的S4L框架在单个引导提示中执行语义角色提取、场景补全、逻辑映射和Prolog规则生成,使得无需人工干预即可将原始交通规则直接翻译为可执行逻辑。使用包含二十条真实世界交通规则的基准来评估每种方法的语法有效性、语义正确性和逻辑完整性。$S4L\ ightarrow Prolog$达到了最高准确率,正确形式化了75%的规则,而$NL\ ightarrow Prolog$达到了60%,$LE\ ightarrow Prolog$达到了55%。定性分析进一步表明,S4L比基线方法更可靠地捕获了隐含的因果关系、道义模态和异常结构。这些结果表明,结构化推理提示可以显著提高自然语言到逻辑翻译在法律和安全关键应用中的可靠性。
英文摘要
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.
CommentsIn Proceedings of the International Workshop on Translating Natural Legal Language into Formal Representations (NLL2FR 2025)