Skip to content

prasanna08/PCFG-Parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NLU Assignment 2

This code implements PCFG CKY parser.

Prerequisites

Requirements

Following dependencies are required to run this code.

  • nltk
  • numpy

Alternatively, you can use following commands to install necessary libraries.

pip install -r requirements.txt

Training PCFG from scratch.

To train model from scratch use Trainer.py. Run following command:

python Trainer.py

Model inference.

To evaluate model use following command:

python Parse.py  [--sentence="<SENTENCE>"]

Arguments:

  • --sentence: Specify the sentence to parse. Use appropriate escape characters as and when necessary. Place sentence inside quotes.

About

PCFG CKY Parser

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages