1)run extractCFG.py ....finds all rules from training file parse trees(data/English_Parsed_Train.txt) 2)run extractPCFg.py ....takes output of step 1(output/CFGrules.txt),gives probabilities to rules 3)run findCNF.py ....takes output of step 2(output/PCFGrules.txt),gives Chomsky Normal form production rules 4)run CKY.py ........takes output of step 3(output/CNFrules.txt),gives Cfinal tree (final_output.txt)
nausheenfatma/PCFG
Probabilistic Context Free Grammar-A dynamic programming algorithm to find the phrase structure parse tree of a sentence.
Python