In this project we will implement the cky (cyk) algorithm for english that acts as recognizer as well as parser.
We will be usingNLTK for representing cfg grammars and parse trees, but parser will be generated from scratch.
The grammar stems from the Airline Travel Information System (ATIS), a project working on spoken dialog systems for air travel.TheATIS CFG is available in the NLTK data package, together with 98 test sentences.
- Given a test sentence find whether the ATIS grammar covers the senetence or not ( Recognizer )
- If the test sentence is derived from the grammar, print all the different parse trees of the sentence.
- We will be using tree module in NLTK to draw the trees.
In the command prompt : python cky_parser.py
press 1 for parser and 2 for Recogniser
For parser : test sentence 89 in Test Sentences would run.
For recogniser : All the Atis sentences will be tested