This is a Common Sense Question Answering System. It coverts any english passage to Answer Set Program (ASP) using JAVA and different NLP libraries. Using goal directed s(ASP) engine, it is able to reason and answer questions written in english.
Work is still in progress.
Following are the software’s used to develop this project -
- JAVA 1.8
- s(ASP) Engine : https://sourceforge.net/projects/sasp-system/ Note: SWI prolog (http://www.swi-prolog.org/) needs to be installed, before installing s(ASP).
Following are the JARS used in the code -
- Java Word Net Interface : https://projects.csail.mit.edu/jwi/
- Apache HTTP Component Client : https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient/4.5.8
- Apache HTTP Component Core : https://mvnrepository.com/artifact/org.apache.httpcomponents/httpcore/4.4.11
- JSON java : https://mvnrepository.com/artifact/org.json/json/20140107
- Stanford CoreNLP : https://stanfordnlp.github.io/CoreNLP/download.html
- Stanford CoreNLP model : https://stanfordnlp.github.io/CoreNLP/download.html
Note: All the JARS are given in the repository except Stanford CoreNLP model, as it is a very large file.
- All the JARS need to be added.
- s(ASP) path must be added in the environment variable PATH.
- Put the the passage in the content variable inside Parent class of the parent.java file
- Run the main in parent.java file.
- When the knowledge representation is done, the system will ask to enter question.
PASSAGE : There are two forks, two spoons and three bananas with four apples on the table.
QUESTION : How many forks are on the table?
ANSWER: 2
QUESTION : How many utensils are on the table?
ANSWER: 4
QUESTION : How many fruits are on the table?
ANSWER: 7