The chart parser enriches each sentence object with a parse_tree object, whose leaves have a link to the sentence words.
The API of the parser is:
class chart_parser { public: /// Constructor chart_parser(const std::string&); /// Get the start symbol of the grammar std::string get_start_symbol(void) const; /// Parse sentences in list void analyze(std::list<sentence> &); };
The constructor receives a file with the CFG grammar to be used by the grammar, which is described in the next section
The method get_start_symbol returns the initial symbol of the grammar, and is needed by the dependency parser (see below).