SIMONE CARUSO, CARMINE DODARO, MARCO MARATEA, MARCO MOCHI, FRANCESCO RICCIO
{"title":"CNL2ASP: Converting Controlled Natural Language Sentences into ASP","authors":"SIMONE CARUSO, CARMINE DODARO, MARCO MARATEA, MARCO MOCHI, FRANCESCO RICCIO","doi":"10.1017/s1471068423000388","DOIUrl":null,"url":null,"abstract":"<p>Answer set programming (ASP) is a popular declarative programming language for solving hard combinatorial problems. Although ASP has gained widespread acceptance in academic and industrial contexts, there are certain user groups who may find it more advantageous to employ a higher-level language that closely resembles natural language when specifying ASP programs. In this paper, we propose a novel tool, called CNL2ASP, for translating English sentences expressed in a controlled natural language (CNL) form into ASP. In particular, we first provide a definition of the type of sentences allowed by our CNL and their translation as ASP rules and then exemplify the usage of the CNL for the specification of both synthetic and real-world combinatorial problems. Finally, we report the results of an experimental analysis conducted on the real-world problems to compare the performance of automatically generated encodings with the ones written by ASP practitioners, showing that our tool can obtain satisfactory performance on these benchmarks.</p>","PeriodicalId":49436,"journal":{"name":"Theory and Practice of Logic Programming","volume":"65 1","pages":""},"PeriodicalIF":1.4000,"publicationDate":"2023-12-20","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Theory and Practice of Logic Programming","FirstCategoryId":"94","ListUrlMain":"https://doi.org/10.1017/s1471068423000388","RegionNum":2,"RegionCategory":"数学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 0
Abstract
Answer set programming (ASP) is a popular declarative programming language for solving hard combinatorial problems. Although ASP has gained widespread acceptance in academic and industrial contexts, there are certain user groups who may find it more advantageous to employ a higher-level language that closely resembles natural language when specifying ASP programs. In this paper, we propose a novel tool, called CNL2ASP, for translating English sentences expressed in a controlled natural language (CNL) form into ASP. In particular, we first provide a definition of the type of sentences allowed by our CNL and their translation as ASP rules and then exemplify the usage of the CNL for the specification of both synthetic and real-world combinatorial problems. Finally, we report the results of an experimental analysis conducted on the real-world problems to compare the performance of automatically generated encodings with the ones written by ASP practitioners, showing that our tool can obtain satisfactory performance on these benchmarks.
答案集编程(ASP)是一种流行的声明式编程语言,用于解决难以解决的组合问题。虽然 ASP 已在学术和工业领域获得广泛认可,但某些用户群体可能会发现,在指定 ASP 程序时,使用一种与自然语言非常相似的高级语言会更有优势。在本文中,我们提出了一种名为 CNL2ASP 的新工具,用于将以受控自然语言(CNL)形式表达的英语句子翻译成 ASP。具体而言,我们首先定义了 CNL 所允许的句子类型,并将其翻译为 ASP 规则,然后举例说明了如何使用 CNL 来规范合成问题和现实世界中的组合问题。最后,我们报告了对真实世界问题进行实验分析的结果,以比较自动生成的编码与 ASP 从业人员编写的编码的性能,结果表明我们的工具可以在这些基准上获得令人满意的性能。
期刊介绍:
Theory and Practice of Logic Programming emphasises both the theory and practice of logic programming. Logic programming applies to all areas of artificial intelligence and computer science and is fundamental to them. Among the topics covered are AI applications that use logic programming, logic programming methodologies, specification, analysis and verification of systems, inductive logic programming, multi-relational data mining, natural language processing, knowledge representation, non-monotonic reasoning, semantic web reasoning, databases, implementations and architectures and constraint logic programming.