Edinburgh Speech Tools  2.1-release
EST_BackoffNgrammarState Class Reference

#include <include/EST_Ngrammar.h>

Collaboration diagram for EST_BackoffNgrammarState:

Public Member Functions

 EST_BackoffNgrammarState ()
 
 EST_BackoffNgrammarState (const EST_Discrete *d, int level)
 
 EST_BackoffNgrammarState (const EST_DiscreteProbDistribution &pdf, int level)
 
 EST_BackoffNgrammarState (const EST_BackoffNgrammarState &s)
 
 EST_BackoffNgrammarState (const EST_BackoffNgrammarState *const s)
 
 ~EST_BackoffNgrammarState ()
 
void clear ()
 
void init ()
 
void init (const EST_Discrete *d, int level)
 
void init (const EST_DiscreteProbDistribution &pdf, int level)
 
bool accumulate (const EST_StrVector &words, const double count=1)
 
bool accumulate (const EST_IVector &words, const double count=1)
 
const EST_DiscreteProbDistributionpdf_const () const
 
EST_DiscreteProbDistributionpdf ()
 
double probability (const EST_String &w) const
 
double frequency (const EST_String &w) const
 
const EST_Stringmost_probable (double *prob=NULL) const
 
int level () const
 
EST_BackoffNgrammarStateget_child (const EST_String &word) const
 
EST_BackoffNgrammarStateget_child (const int word) const
 
void remove_child (EST_BackoffNgrammarState *child, const EST_String &name)
 
void zap ()
 
const EST_BackoffNgrammarStateget_state (const EST_StrVector &words) const
 
bool ngram_exists (const EST_StrVector &words, const double threshold) const
 
double get_backoff_weight () const
 
double get_backoff_weight (const EST_StrVector &words) const
 
bool set_backoff_weight (const EST_StrVector &words, const double w)
 
void frequency_of_frequencies (EST_DVector &ff)
 
void print_freqs (ostream &os, const int order, EST_String followers="")
 

Protected Member Functions

EST_BackoffNgrammarStateadd_child (const EST_Discrete *d, const EST_StrVector &words)
 
EST_BackoffNgrammarStateadd_child (const EST_Discrete *d, const EST_IVector &words)
 

Protected Attributes

int p_level
 
double backoff_weight
 
EST_DiscreteProbDistribution p_pdf
 
EST_StringTrie children
 

Friends

ostream & operator<< (ostream &s, const EST_BackoffNgrammarState &a)
 

Detailed Description

Definition at line 129 of file EST_Ngrammar.h.

Constructor & Destructor Documentation

EST_BackoffNgrammarState::EST_BackoffNgrammarState ( )
inline

Definition at line 144 of file EST_Ngrammar.h.

EST_BackoffNgrammarState::EST_BackoffNgrammarState ( const EST_Discrete d,
int  level 
)
inline

Definition at line 146 of file EST_Ngrammar.h.

EST_BackoffNgrammarState::EST_BackoffNgrammarState ( const EST_DiscreteProbDistribution pdf,
int  level 
)
inline

Definition at line 148 of file EST_Ngrammar.h.

EST_BackoffNgrammarState::EST_BackoffNgrammarState ( const EST_BackoffNgrammarState s)
EST_BackoffNgrammarState::EST_BackoffNgrammarState ( const EST_BackoffNgrammarState *const  s)
EST_BackoffNgrammarState::~EST_BackoffNgrammarState ( )

Definition at line 111 of file EST_Ngrammar.cc.

Member Function Documentation

EST_BackoffNgrammarState * EST_BackoffNgrammarState::add_child ( const EST_Discrete d,
const EST_StrVector words 
)
protected

Definition at line 236 of file EST_Ngrammar.cc.

EST_BackoffNgrammarState * EST_BackoffNgrammarState::add_child ( const EST_Discrete d,
const EST_IVector words 
)
protected

Definition at line 266 of file EST_Ngrammar.cc.

void EST_BackoffNgrammarState::clear ( )

Definition at line 118 of file EST_Ngrammar.cc.

void EST_BackoffNgrammarState::init ( )

Definition at line 124 of file EST_Ngrammar.cc.

void EST_BackoffNgrammarState::init ( const EST_Discrete d,
int  level 
)

Definition at line 131 of file EST_Ngrammar.cc.

void EST_BackoffNgrammarState::init ( const EST_DiscreteProbDistribution pdf,
int  level 
)

Definition at line 138 of file EST_Ngrammar.cc.

bool EST_BackoffNgrammarState::accumulate ( const EST_StrVector words,
const double  count = 1 
)

Definition at line 145 of file EST_Ngrammar.cc.

bool EST_BackoffNgrammarState::accumulate ( const EST_IVector words,
const double  count = 1 
)

Definition at line 184 of file EST_Ngrammar.cc.

const EST_DiscreteProbDistribution& EST_BackoffNgrammarState::pdf_const ( ) const
inline

Definition at line 166 of file EST_Ngrammar.h.

EST_DiscreteProbDistribution& EST_BackoffNgrammarState::pdf ( )
inline

Definition at line 167 of file EST_Ngrammar.h.

double EST_BackoffNgrammarState::probability ( const EST_String w) const
inline

Definition at line 168 of file EST_Ngrammar.h.

double EST_BackoffNgrammarState::frequency ( const EST_String w) const
inline

Definition at line 170 of file EST_Ngrammar.h.

const EST_String& EST_BackoffNgrammarState::most_probable ( double *  prob = NULL) const
inline

Definition at line 172 of file EST_Ngrammar.h.

int EST_BackoffNgrammarState::level ( ) const
inline

Definition at line 175 of file EST_Ngrammar.h.

EST_BackoffNgrammarState* EST_BackoffNgrammarState::get_child ( const EST_String word) const
inline

Definition at line 177 of file EST_Ngrammar.h.

EST_BackoffNgrammarState* EST_BackoffNgrammarState::get_child ( const int  word) const
inline

Definition at line 181 of file EST_Ngrammar.h.

void EST_BackoffNgrammarState::remove_child ( EST_BackoffNgrammarState child,
const EST_String name 
)

Definition at line 293 of file EST_Ngrammar.cc.

void EST_BackoffNgrammarState::zap ( )

Definition at line 373 of file EST_Ngrammar.cc.

const EST_BackoffNgrammarState * EST_BackoffNgrammarState::get_state ( const EST_StrVector words) const

Definition at line 348 of file EST_Ngrammar.cc.

bool EST_BackoffNgrammarState::ngram_exists ( const EST_StrVector words,
const double  threshold 
) const

Definition at line 331 of file EST_Ngrammar.cc.

double EST_BackoffNgrammarState::get_backoff_weight ( ) const
inline

Definition at line 196 of file EST_Ngrammar.h.

double EST_BackoffNgrammarState::get_backoff_weight ( const EST_StrVector words) const

Definition at line 396 of file EST_Ngrammar.cc.

bool EST_BackoffNgrammarState::set_backoff_weight ( const EST_StrVector words,
const double  w 
)

Definition at line 427 of file EST_Ngrammar.cc.

void EST_BackoffNgrammarState::frequency_of_frequencies ( EST_DVector ff)

Definition at line 458 of file EST_Ngrammar.cc.

void EST_BackoffNgrammarState::print_freqs ( ostream &  os,
const int  order,
EST_String  followers = "" 
)

Definition at line 303 of file EST_Ngrammar.cc.

Friends And Related Function Documentation

ostream& operator<< ( ostream &  s,
const EST_BackoffNgrammarState a 
)
friend

Definition at line 474 of file EST_Ngrammar.cc.

Member Data Documentation

int EST_BackoffNgrammarState::p_level
protected

Definition at line 134 of file EST_Ngrammar.h.

double EST_BackoffNgrammarState::backoff_weight
protected

Definition at line 135 of file EST_Ngrammar.h.

EST_DiscreteProbDistribution EST_BackoffNgrammarState::p_pdf
protected

Definition at line 136 of file EST_Ngrammar.h.

EST_StringTrie EST_BackoffNgrammarState::children
protected

Definition at line 137 of file EST_Ngrammar.h.


The documentation for this class was generated from the following files: