41 #ifndef __PredictionSuffixTree_H__ 
   42 #define __PredictionSuffixTree_H__ 
   44 #include "EST_simplestats.h" 
   45 #include "EST_types.h" 
   46 #include "EST_Features.h" 
   67     const EST_String &get_path(
void)
 const {
return path;}
 
   69     void set_level(
int l) {p_level=l;}
 
   70     void set_state(
int s) {state=s;}
 
   71     int get_state(
void)
 const {
return state;}
 
   72     int get_level(
void)
 const {
return p_level;}
 
   74     void cumulate(
const int i,
double count=1) {pd.
cumulate(i,count);}
 
   75     const EST_String &most_probable(
double *p) 
const;
 
   77     void print_freqs(ostream &os);
 
   78     void print_probs(ostream &os);
 
   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;
 
  110     EST_PredictionSuffixTree();
 
  111     EST_PredictionSuffixTree(
const int order) {init(order);}
 
  112     EST_PredictionSuffixTree(
const EST_String filename);
 
  114     ~EST_PredictionSuffixTree(); 
 
  116     void init(
const int order);
 
  117     double samples()
 const { 
return pd->
samples(); }
 
  118     int states()
 const { 
return num_states; }
 
  119     int order(
void)
 const {
return p_order;}
 
  120     void accumulate(
const EST_StrVector &words,
const double count=1,
const int index=0);
 
  123     int save(
const EST_String filename,
const EST_PredictionSuffixTree::EST_filetype type=PredictionSuffixTree_ascii);
 
  134     void print_freqs(ostream &os);
 
  135     void print_probs(ostream &os);
 
  142     {
return p_prob_dist(nodes,words);}
 
  153 #endif // __PredictionSuffixTree_H__