Robust CYK-Parse (on CNF strings) with easy CYK-Parse-Tree Retrieval. Based on algorithm described by Ernest Davis.
- This program is written using
python3.5
. - The input files used within the main python file,
cyk_parser.py
, are necessary and must be in its directory. get_grammar.py
is imported bycyk_parser.py
and is used to read the grammar from file (grammar.txt), parse the grammar text and create the necessary objects. in which the grammar is stored.- To run, simply pass the file as an argument to the python interpreter
python3.5 cyk_parser.py
.