The CKY algorithm is a parsing algorithm that takes a sequence and a context-free grammar in Chomsky Normal Form, and determines whether it can be parsed into a sentence. rules.txt stores a large CFG.
In grammar.py, read_rules takes each line in the grammar file and populates the instance variables rhs_to_rules, lhs_to_rules, and start symbol. Using parse_rule, it separates the lhs, rhs, and ...
Abstract: Low-latency solutions for syntactic parsing are needed if parsing is to become an integral part of user-facing natural language applications. Unfortunately, most state-of-the-art ...