This is a very simple semantic parser in Prolog, implemented using an adaptive grammar. In other words, this parser is able to "learn" new grammar rules from its input.
The grammar rules for this parser are defined in input_file.txt.
This parser is relatively slow, but it could be much faster if it were re-written as an adaptive Earley parser.