40 #ifndef __EST_SCFG_CHART_H__ 41 #define __EST_SCFG_CHART_H__ 43 #include "EST_String.h" 44 #include "EST_simplestats.h" 45 #include "EST_string_aux.h" 47 #include "ling_class/EST_Relation.h" 73 int pos(
void) {
return p_pos; }
75 double prob(
void) {
return p_prob; }
77 int d1() {
return p_d1; }
79 int d2() {
return p_d2; }
117 double find_best_tree(
int start,
int end,
int p)
119 if ((r=edges[start][end][p]) != 0)
return r->
prob();
120 else return find_best_tree_cal(start,end,p); }
122 double find_best_tree_cal(
int start,
int end,
int p);
123 void setup_edge_table();
124 void delete_edge_table();
127 void extract_edge(
int start,
int end,
int p,
143 void set_grammar_rules(LISP r);
145 void set_grammar_rules(
EST_SCFG &grammar);
170 void EST_SCFG_chart_load_relation(
EST_Relation *s,LISP sent);
174 LISP scfg_parse(LISP
string,LISP grammar);
177 LISP scfg_parse(LISP
string,
EST_SCFG &grammar);
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
double prob(void)
Edge probability.