halokid / CYK-algorithm-with-all-possible-parse-trees

C++ code to implement CYK algorithm with given Context Free Grammar in Chomsky Normal Form and input string. This code also prints all possible parse trees for the input string even if the grammar is ambigous.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CYK-algorithm-with-all-possible-parse-trees

C++ code to implement CYK algorithm with given Context Free Grammar in Chomsky Normal Form and input string. This code also prints all possible parse trees for the input string even if the grammar is ambigous.

INPUT: (CFG and input string) You can give CFG as input in input.txt file in specified form. input string can be given once you run the executable.

OUTPUT: Output is by default directed to output.txt, it can be changed in main.cpp to print on the console .

About

C++ code to implement CYK algorithm with given Context Free Grammar in Chomsky Normal Form and input string. This code also prints all possible parse trees for the input string even if the grammar is ambigous.


Languages

Language:C++ 100.0%