Reputation: 294
I would like to build a question answering system that it can answer only yes or no .
Suppose that I have got a question and a text file . In the text file , there are 4-5 snippets . With these snippets i could answer the question .
So , I would like to build a system that gets a question and a text file as input and extract an asnwer (yes or no)
How could I start ??
My tools are : Python (nltk) Prolog mysql (if it needs )
Upvotes: 2
Views: 1144
Reputation: 7209
Prolog itself is "a qa system to answer yes or no".
Your "text file" can be simple Prolog facts. Then you just load (consult) your facts file in Prolog system and use queries to get yes or no answers.
Example of top of my head (facts.pl):
prime(2).
prime(3).
prime(5).
prime(7).
capital('Ukraine', 'Kyiv').
capital('Ukraine', 'Kiev').
bird(penguin).
fish(shark).
Consult the file:
?- [facts].
Ask questions. Is penguin a bird? Is shark a bird?
?- bird(penguin).
true.
?- bird(shark).
false.
SWI-Prolog answers with 'true' and 'false', other systems (like ECLiPSe CLP http://www.eclipseclp.org/) may actually use 'Yes' and 'No'.
Upvotes: 1