![]() When an assertion is entered by the user, the program uses PySWIP in order to add new identified facts to the SWI-Prolog knowledge base, while when a query is entered, always using PySWIP the program forwards the correct equivalent query to SWI-Prolog interpreter, so it can answer correctly according to the current knowledge base. The use of this library was necessary due to the decision of use Prolog in order to implement the Planner Algorithm. All those actions have been implemented using another Python library, namely PySWIP, a Python - SWI-Prolog bridge enabling to query SWI-Prolog in Python programs. Instead in case of a command it has to run the planner algorithm in order to reach the required goal. In case of an assertion, the program has to add facts from it to the knowledge base, according to the Planner Algorithm, while in case of a query it has to answer it according to the knowledge base. Therefore it can act differently according to the cases. Once obtained the tagged tree structure of the entered sentence, the program explores it in order to understand what the user wants. Once the user has entered the sentence, the program takes, tokenizes and transforms it in a part-of- speech tagged tree structure. This library allows to build Python programs which work with human language data, providing text processing for classification, tokenization, tagging and parsing. Indeed the program uses a Python library for NLP, namely Natural Language Toolkit (NLTK). In order to recognize the type of sentence the program uses the Natural Language Processing (NLP), a branch of AI that helps computers understand, interpret and manipulate human language. Once entered a sentence, the program recognize what kind it is and react accordingly to the result. Using the program the user has only to type sentences (reasonables in the domain of interest) that can be assertions, queries or commands. This type of features is essential in many domains-e.g., automatically modify the plan length in a planning problem.The goal of this project was to implement a program that allows users to solve the blocks world problem interacting only using the natural language. E.g., we wish to write programs in a high-level language (Prolog in this case), which are capable to access ASP programs, modify their structure (by adding or removing rules), and access and reason with answer sets. – ASP solvers are independent systems interaction with other languages can be performed only through complex, low level APIs this prevents programmers from writing programs that manipulate ASP programs and answer sets as first-class citizens. These activities are important in many application domains-e.g., to express soft constraints, to support preferences when using ASP to perform planning. Nevertheless, ASP systems offer very limited capabilities for reasoning on the whole class of answer sets associated to a program-e.g., to perform selection of models according to user-defined criteria or to compare models. – ASP programmers can control the computation of answer sets through the rules that they include in the logic program. In particular, it does not directly support an interactive development of programs (as in Prolog), where one can immediately explore the results of simply adding/removing rules. The process lacks any levels of interaction with the user. Most ASP systems offer only a batch approach to execution of programs-programs are completely developed, “compiled”, executed, and finally answer sets are proposed to the user. ![]() – The development of an ASP program is viewed as a “monolithic” process. However, this is not completely satisfactory: These features allow declarative solutions in speci.c application domains. Most existing ASP solvers have been extended to provide front-ends that are suitable to encode specialized forms of knowledge-e.g., weight-constraints, restricted forms of optimization, front-ends for planning and diagnosis. A number of answer set solvers have been proposed in recent years, such as Smodels, DLV, Cmodels, and ASSAT.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |