Using context-free grammar formalism to parse English sentences to determine their structure to help computer to better understand the meaning of the sentence.
- Make sure Python 3.6+ is installed.
- Clone this repodotory :
$ git clone https://github.com/krvaibhaw/sentanceparser.git
- Change Directory :
$ cd sentanceparser
- Install requirements
$ pip install requirements.txt
- Run the program:
$ python parser.py
And enter the sentence. Or,
$ python parser.py <sentance folder path>/<file.txt>
Example :
$ python parser.py sentences/1.txt
-
Output after parsing
Parsed sentance along with the derivation tree
Sample output can be accessed in samples section.
Feel free to follow along the code provided along with mentioned comments for
better understanding of the project, if any issues feel free to reach me out.
Contributions are welcome!
Please feel free to submit a Pull Request.