40 #ifndef __EST_SCFG_CHART_H__ 41 #define __EST_SCFG_CHART_H__ 74 int pos(
void) {
return p_pos; }
76 double prob(
void) {
return p_prob; }
78 int d1() {
return p_d1; }
80 int d2() {
return p_d2; }
119 double find_best_tree(
int start,
int end,
int p)
121 if ((r=edges[start][end][p]) != 0)
return r->
prob();
122 else return find_best_tree_cal(start,end,p); }
124 double find_best_tree_cal(
int start,
int end,
int p);
125 void setup_edge_table();
126 void delete_edge_table();
129 void extract_edge(
int start,
int end,
int p,
145 void set_grammar_rules(LISP r);
147 void set_grammar_rules(
EST_SCFG &grammar);
float end(const EST_Item &item)
void EST_SCFG_chart_load_relation(EST_Relation *s, LISP sent)
int d2()
(Non)terminal of daughter 2
int pos(void)
Postion, 0 1 or 2, where 0 is empty, 1 is incomplete 2 is complete.
int d1()
(Non)terminal of daughter 1
A class representing a stochastic context free grammar (SCFG).
float start(const EST_Item &item)
double prob(void)
Edge probability.
A class for parsing with a probabilistic grammars.
LISP scfg_parse(LISP string, LISP grammar)
An internal class for EST_SCFG_Chart for representing edges in the chart during parsing with SCFGs...
Utility EST_String Functions header file.