Loading...
Searching...
No Matches
EST_BackoffNgrammarState Class Reference
Collaboration diagram for EST_BackoffNgrammarState:
[legend]

## Public Member Functions

| 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)
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_DiscreteProbDistribution & | pdf_const () const
EST_DiscreteProbDistribution & | pdf ()
double | probability (const EST_String &w) const
double | frequency (const EST_String &w) const
const EST_String & | most_probable (double *prob=NULL) const
const int | level () const
EST_BackoffNgrammarState * | get_child (const EST_String &word) const
EST_BackoffNgrammarState * | get_child (const int word) const
void | remove_child (EST_BackoffNgrammarState *child, const EST_String &name)
void | zap ()
const EST_BackoffNgrammarState *const | get_state (const EST_StrVector &words) const
bool | ngram_exists (const EST_StrVector &words, const double threshold) const
const double | get_backoff_weight () const
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_BackoffNgrammarState * | add_child (const EST_Discrete *d, const EST_StrVector &words)
EST_BackoffNgrammarState * | add_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 131 of file EST_Ngrammar.h.

## Constructor & Destructor Documentation

## EST_BackoffNgrammarState() [1/3]

EST_BackoffNgrammarState::EST_BackoffNgrammarState | ( |  | ) |

inline

Definition at line 146 of file EST_Ngrammar.h.

## EST_BackoffNgrammarState() [2/3]

EST_BackoffNgrammarState::EST_BackoffNgrammarState | ( | const EST_Discrete * | d,
|  | int | level )

inline

Definition at line 148 of file EST_Ngrammar.h.

## EST_BackoffNgrammarState() [3/3]

EST_BackoffNgrammarState::EST_BackoffNgrammarState | ( | const EST_DiscreteProbDistribution & | pdf,
|  | int | level )

inline

Definition at line 150 of file EST_Ngrammar.h.

## ~EST_BackoffNgrammarState()

EST_BackoffNgrammarState::~EST_BackoffNgrammarState | ( |  | ) |

Definition at line 111 of file EST_Ngrammar.cc.

## Member Function Documentation

## add_child() [1/2]

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

protected

Definition at line 235 of file EST_Ngrammar.cc.

## add_child() [2/2]

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

protected

Definition at line 265 of file EST_Ngrammar.cc.

## clear()

void EST_BackoffNgrammarState::clear | ( |  | ) |

Definition at line 118 of file EST_Ngrammar.cc.

## init() [1/3]

void EST_BackoffNgrammarState::init | ( |  | ) |

Definition at line 124 of file EST_Ngrammar.cc.

## init() [2/3]

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

Definition at line 130 of file EST_Ngrammar.cc.

## init() [3/3]

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

Definition at line 137 of file EST_Ngrammar.cc.

## accumulate() [1/2]

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

Definition at line 144 of file EST_Ngrammar.cc.

## accumulate() [2/2]

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

Definition at line 183 of file EST_Ngrammar.cc.

## pdf_const()

const EST_DiscreteProbDistribution & EST_BackoffNgrammarState::pdf_const | ( |  | ) | const

inline

Definition at line 168 of file EST_Ngrammar.h.

## pdf()

EST_DiscreteProbDistribution & EST_BackoffNgrammarState::pdf | ( |  | ) |

inline

Definition at line 169 of file EST_Ngrammar.h.

## probability()

double EST_BackoffNgrammarState::probability | ( | const EST_String & | w | ) | const

inline

Definition at line 170 of file EST_Ngrammar.h.

## frequency()

double EST_BackoffNgrammarState::frequency | ( | const EST_String & | w | ) | const

inline

Definition at line 172 of file EST_Ngrammar.h.

## most_probable()

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

inline

Definition at line 174 of file EST_Ngrammar.h.

## level()

const int EST_BackoffNgrammarState::level | ( |  | ) | const

inline

Definition at line 177 of file EST_Ngrammar.h.

## get_child() [1/2]

EST_BackoffNgrammarState * EST_BackoffNgrammarState::get_child | ( | const EST_String & | word | ) | const

inline

Definition at line 179 of file EST_Ngrammar.h.

## get_child() [2/2]

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

inline

Definition at line 183 of file EST_Ngrammar.h.

## remove_child()

void EST_BackoffNgrammarState::remove_child | ( | EST_BackoffNgrammarState * | child,
|  | const EST_String & | name )

Definition at line 292 of file EST_Ngrammar.cc.

## zap()

void EST_BackoffNgrammarState::zap | ( |  | ) |

Definition at line 372 of file EST_Ngrammar.cc.

## get_state()

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

Definition at line 347 of file EST_Ngrammar.cc.

## ngram_exists()

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

Definition at line 330 of file EST_Ngrammar.cc.

## get_backoff_weight() [1/2]

const double EST_BackoffNgrammarState::get_backoff_weight | ( |  | ) | const

inline

Definition at line 198 of file EST_Ngrammar.h.

## get_backoff_weight() [2/2]

const double EST_BackoffNgrammarState::get_backoff_weight | ( | const EST_StrVector & | words | ) | const

Definition at line 395 of file EST_Ngrammar.cc.

## set_backoff_weight()

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

Definition at line 426 of file EST_Ngrammar.cc.

## frequency_of_frequencies()

void EST_BackoffNgrammarState::frequency_of_frequencies | ( | EST_DVector & | ff | ) |

Definition at line 457 of file EST_Ngrammar.cc.

## print_freqs()

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

Definition at line 302 of file EST_Ngrammar.cc.

## Friends And Related Symbol Documentation

## operator<<

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

friend

Definition at line 473 of file EST_Ngrammar.cc.

## Member Data Documentation

## p_level

int EST_BackoffNgrammarState::p_level

protected

Definition at line 136 of file EST_Ngrammar.h.

## backoff_weight

double EST_BackoffNgrammarState::backoff_weight

protected

Definition at line 137 of file EST_Ngrammar.h.

## p_pdf

EST_DiscreteProbDistribution EST_BackoffNgrammarState::p_pdf

protected

Definition at line 138 of file EST_Ngrammar.h.

## children

EST_StringTrie EST_BackoffNgrammarState::children

protected

Definition at line 139 of file EST_Ngrammar.h.

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

- include/EST_Ngrammar.h
- grammar/ngram/EST_Ngrammar.cc