MyTalk is a Prolog tool for NLP, based on WordNet lexical database, for the English language. It is an extension of the Talk program, presented in (Pereira and Shieber, 1987). First of all, just as Talk, MyTalk is able to:
- perform the syntactic parsing of a declarative sentence or of a query, returning as result the corresponding logical form (FOL);
- transform the obtained logical form into a Horn clause (if possible)
- add the clause to the Prolog database (declarative sentence) or obtain the response to the query
In addition, MyTalk:
- performs a morphological analysis of the words, based on the ProNTo_Morph tool, which checks the concordance in number between subject and verb of a sentence;
- instead of using a fixed lexicon cabled within the program, it uses the WordNet© lexical database to check if a word exists;
- supports the usage of common nouns as subjects and is able to handle a wider range of input assertions and queries. It is also able to transform a wider range of FOLs into Horn clauses.
- uses the hypernym and antonym WordNet© relationships format to define a demo ontology, used to perform a demo semantic check on input assertions. Such ontology is based on the considerations presented in the Chapter 6 of (Blackburn and Bos, 2005).
The access to WordNet is partially inspired to the files defined by the WordNet integration ProNTo tool, which was an useful source of inspiration.
Fundamental readings to understand and extend this work are:
- Pereira, F. C., & Shieber, S. M. (1987). Prolog and natural-language analysis. Microtome Publishing.
- Blackburn, P., & Bos, J. (2005). Representation and inference for natural language. A first course in computational semantics. CSLI.
- Miller, G. A. (1995). WordNet: a lexical database for English. Communications of the ACM, 38(11), 39-41.
- Ribeiro, C. et al. (2004). INQUER: A WordNet-based Question-Answering Application. In LREC.
- ProNTo, Prolog Natural Language Tools (http://ai1.ai.uga.edu/mc/pronto/).
This program was tested using SWI-Prolog (http://www.swi-prolog.org/), both versions 5.2.13 and 7.6.4. If you find any bug or want further information about this program, feel free to send me an e-mail.
The entry-point of the program is the file myTalk.pl: open it with SWI-Prolog or consult it from the current environment. Type the predicate main_loop.: the user interface is the same of the orginal Talk program.