#include <include/EST_SCFG_Chart.h>
Public Member Functions | |
Constructor and initialisation functions | |
| EST_SCFG_Chart () | |
| ~EST_SCFG_Chart () | |
Grammar and parse string initialisation functions | |
| void | set_grammar_rules (LISP r) |
| Initialize from LISP rules set. | |
| void | set_grammar_rules (EST_SCFG &grammar) |
| Initialize from existing {EST_SCFG} grammar. | |
| void | setup_wfst (EST_Relation *s, const EST_String &name="name") |
| void | setup_wfst (EST_Item *s, EST_Item *e, const EST_String &name="name") |
parsing functions | |
| void | parse () |
| Parses the loaded WFST with the loaded grammar. | |
| LISP | find_parse () |
| Return the parse in full LISP form. | |
| void | extract_parse (EST_Relation *syn, EST_Relation *word, int force=0) |
| Extract parse tree and add it to syn linking leafs to word. | |
| void | extract_parse (EST_Relation *syn, EST_Item *s, EST_Item *e, int force=0) |
| Extract parse tree and add it to syn linking leafs to items s to e. | |
A class for parsing with a probabilistic grammars.
The chart (sort of closer to CKY table) consists of indexes of edges indexed by vertex number of mother non-terminal.
The initial values (well-formed substring table) are taken from an {EST_Stream} with a given feature. The grammar may be specified as LISP rules or as an already constructed {EST_SCFG}.
This produces a single best parse. It treats the grammar as strictly context free in that the probability of a nonterminal over vertex n to m, is the sum of all the possible analyses of that sub-tree. Only the best analysis is kept for the resulting parse tree.
Definition at line 100 of file EST_SCFG_Chart.h.
| void EST_SCFG_Chart::setup_wfst | ( | EST_Relation * | s, |
| const EST_String & | name = "name" |
||
| ) |
Initialize for parsing from relation using { name} feature setting up the "Well Formed Substring Table"
Definition at line 137 of file EST_SCFG_Chart.cc.
| void EST_SCFG_Chart::setup_wfst | ( | EST_Item * | s, |
| EST_Item * | e, | ||
| const EST_String & | name = "name" |
||
| ) |
Initialize for parsing from s to e using { name} feature setting up the "Well Formed Substring Table"
Definition at line 144 of file EST_SCFG_Chart.cc.