41 #ifndef __PredictionSuffixTree_H__ 42 #define __PredictionSuffixTree_H__ 87 enum EST_filetype {PredictionSuffixTree_ascii, PredictionSuffixTree_binary};
97 double *prob,
int *
state,
98 const int index=0)
const;
108 const int index=0)
const;
116 void init(
const int order);
118 int states()
const {
return num_states; }
119 int order(
void)
const {
return p_order;}
123 int save(
const EST_String filename,
const EST_PredictionSuffixTree::EST_filetype type=PredictionSuffixTree_ascii);
142 {
return p_prob_dist(nodes,words);}
153 #endif // __PredictionSuffixTree_H__ EST_DiscreteProbDistribution pd
EST_PredictionSuffixTree_tree_node * nodes
const EST_DiscreteProbDistribution & prob_dist(const EST_StrVector &words) const
EST_PredictionSuffixTree(const int order)
void delete_node(void *n)
double samples(void) const
Total number of example found.
EST_PredictionSuffixTree_tree_node()
bool save(Lattice &lattice, EST_String filename)
int get_level(void) const
const EST_String & most_probable(double *p) const
bool load(Lattice &lattice, EST_String filename)
EST_DiscreteProbDistribution * pd
int index(EST_TList< T > &l, T &val, bool(*eq)(const EST_UItem *, const EST_UItem *)=NULL)
void cumulate(const EST_String &s, double count=1)
int get_state(void) const
void cumulate(const EST_String &s, double count=1)
Add this observation, may specify number of occurrences.
#define VAL_REGISTER_CLASS_DCLS(NAME, CLASS)
~EST_PredictionSuffixTree_tree_node()
section options Options< strong > or ngram_per_line Pseudo words
const EST_DiscreteProbDistribution & prob_dist() const
void print_probs(ostream &os)
void cumulate(const int i, double count=1)
void set_path(const EST_String &s)
void print_freqs(ostream &os)
const EST_String & get_path(void) const