Question: Given a file with syntax trees, read in all the trees from the file. Conver the trees in the file into a Chomsky Normal Form
Given a file with syntax trees, read in all the trees from the file. Conver the trees in the file into a Chomsky Normal Form by using the Tree.chomskynormalform and the parameter of horzMarkov within NLTK package. Extract the productions of these CNF trees. Lastly, create a PCFG using inducepcfg function in NLTK Please use python and nltk library.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
