50#include "EST_Ngrammar.h"
80 for (i=0; i < ngram.order()-1; i++)
82 *ngram.vocab,*ngram.pred_vocab);
84 for (i=0; i < ngram.num_states(); i++)
89 !ngram.p_states[i].pdf().
item_end(k);
94 ngram.p_states[i].pdf().
item_freq(k,name,freq);
96 for (
j=0;
j < ngram.order()-1;
j++)
100 for (l=0; l <
j; l++)
119 if (ngram.representation() != EST_Ngrammar::dense)
121 cerr <<
"Ngrammar: can only ptsmooth dense ngrammars" <<
endl;
126 for (i=0; i < ngram.num_states(); i++)
170 for(i=0; i<order; i++)
EST_Litem * item_next(EST_Litem *idx) const
Used for iterating through members of the distribution.
void item_freq(EST_Litem *idx, EST_String &s, double &freq) const
During iteration returns name and frequency given index
EST_Litem * item_start() const
Used for iterating through members of the distribution.
double samples(void) const
Total number of example found.
void set_frequency(const EST_String &s, double c)
int item_end(EST_Litem *idx) const
Used for iterating through members of the distribution.