Skip to content

iabhibits/NLU_Assignment3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

E1-246(NLU) 2019: Assignment3

Implement PCFG and CYK parser using NLTK Penn Treebank

Requirements:

NLTK
Download Penn treebank:

    import nltk
    nltk.download('treebank')
    
PYEVALB

Usage

To train model for generating PCFG.
python evaluate.py train        

To evaluate trained model on test dataset ( 10% of penn treebank )
python evaluate.py evaluate

To evaluate the model using the custom sentence.
python evaluate.py test 'your_sentence'  

About

CYK parser for PCFG using NLTK Penn Treebank

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages