|Did you know ...||Search Documentation:|
|Pack logicmoo_nlu -- ext/ace_in_gf/tools/Codeco/README.md|
Works but tokenization should be improved:
grammar.pl: parser in Codeco format (incl. a small test vocabulary), comes from the AceWiki distribution, but modified
grammar_dcg.pl: parser in DCG (automatically generated, do not edit!)
grammar_dcg.pl, only needed if you modify
parse.pl: parses STDIN using
sentences.txt: example input for
of-noun is also a noun and vice versa. This reflects better ACE where there is no explicit
simple_sentence_1as its argument (was:
simple_sentence_2), i.e. `it is false that there is ...` is now possible, as well as `it is false that it is false that ...`.
The output (STDOUT) shows for each input sentence on a separate line its tokenization (where two spaces mark the token border) and a prefix OK or FAIL depending on whether parsing succeeded or not.
echo "Mary is a friend of Mary ." | sh run.sh
OK: Mary is a friend of Mary .
cat sentences | sh run.sh
OK: Mary asks Mary . OK: Mary is a friend of at least 2 women . Mary asks Mary . FAIL: this sentence should fail to parse OK: everybody asks somebody . ...
Parsing the complete test set (19k sentences):
real 0m21.224s user 0m21.097s sys 0m0.144s