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

## Public Member Functions

| EST_PredictionSuffixTree (const int order)
| EST_PredictionSuffixTree (const EST_String filename)
| EST_PredictionSuffixTree (const EST_TList< EST_String > &vocab, int order=2)
void | clear (void)
void | init (const int order)
double | samples () const
int | states () const
int | order (void) const
void | accumulate (const EST_StrVector &words, const double count=1, const int index=0)
int | load (const EST_String filename)
int | save (const EST_String filename, const EST_PredictionSuffixTree::EST_filetype type=PredictionSuffixTree_ascii)
void | build (const EST_String filename, const EST_String prev, const EST_String prev_prev, const EST_String last)
void | build (const EST_StrList &input)
void | test (const EST_String filename)
void | print_freqs (ostream &os)
void | print_probs (ostream &os)
const EST_String & | predict (const EST_StrVector &words) const
const EST_String & | predict (const EST_StrVector &words, double *prob) const
const EST_String & | predict (const EST_StrVector &words, double *prob, int *state) const
const EST_DiscreteProbDistribution & | prob_dist (const EST_StrVector &words) const
double | rev_prob (const EST_StrVector &words) const
double | rev_prob (const EST_StrVector &words, const EST_DiscreteProbDistribution &pd) const

## Protected Member Functions

const EST_String & | ppredict (EST_PredictionSuffixTree_tree_node *node, const EST_StrVector &words, double *prob, int *state, const int index=0) const
void | p_accumulate (EST_PredictionSuffixTree_tree_node *node, const EST_StrVector &words, double count, const int index=0)
const EST_DiscreteProbDistribution & | p_prob_dist (EST_PredictionSuffixTree_tree_node *node, const EST_StrVector &words, const int index=0) const

## Protected Attributes

int | p_order
int | num_states
EST_PredictionSuffixTree_tree_node * | nodes
EST_DiscreteProbDistribution * | pd

## Detailed Description

Definition at line 83 of file EST_PST.h.

## Constructor & Destructor Documentation

## EST_PredictionSuffixTree() [1/2]

EST_PredictionSuffixTree::EST_PredictionSuffixTree | ( | void |  | ) |

Definition at line 124 of file EST_PST.cc.

## EST_PredictionSuffixTree() [2/2]

EST_PredictionSuffixTree::EST_PredictionSuffixTree | ( | const int | order | ) |

inline

Definition at line 111 of file EST_PST.h.

## ~EST_PredictionSuffixTree()

EST_PredictionSuffixTree::~EST_PredictionSuffixTree | ( |  | ) |

Definition at line 142 of file EST_PST.cc.

## Member Function Documentation

## ppredict()

const EST_String & EST_PredictionSuffixTree::ppredict | ( | EST_PredictionSuffixTree_tree_node * | node,
|  | const EST_StrVector & | words,
|  | double * | prob,
|  | int * | state,
|  | const int | index = 0 ) const

protected

Definition at line 280 of file EST_PST.cc.

## p_accumulate()

void EST_PredictionSuffixTree::p_accumulate | ( | EST_PredictionSuffixTree_tree_node * | node,
|  | const EST_StrVector & | words,
|  | double | count,
|  | const int | index = 0 )

protected

Definition at line 205 of file EST_PST.cc.

## p_prob_dist()

const EST_DiscreteProbDistribution & EST_PredictionSuffixTree::p_prob_dist | ( | EST_PredictionSuffixTree_tree_node * | node,
|  | const EST_StrVector & | words,
|  | const int | index = 0 ) const

protected

Definition at line 157 of file EST_PST.cc.

## clear()

void EST_PredictionSuffixTree::clear | ( | void |  | ) |

Definition at line 149 of file EST_PST.cc.

## init()

void EST_PredictionSuffixTree::init | ( | const int | order | ) |

Definition at line 133 of file EST_PST.cc.

## samples()

double EST_PredictionSuffixTree::samples | ( |  | ) | const

inline

Definition at line 117 of file EST_PST.h.

## states()

int EST_PredictionSuffixTree::states | ( |  | ) | const

inline

Definition at line 118 of file EST_PST.h.

## order()

int EST_PredictionSuffixTree::order | ( | void |  | ) | const

inline

Definition at line 119 of file EST_PST.h.

## accumulate()

void EST_PredictionSuffixTree::accumulate | ( | const EST_StrVector & | words,
|  | const double | count = 1,
|  | const int | index = 0 )

Definition at line 182 of file EST_PST.cc.

## load()

int EST_PredictionSuffixTree::load | ( | const EST_String | filename | ) |

Definition at line 344 of file EST_PST.cc.

## save()

int EST_PredictionSuffixTree::save | ( | const EST_String | filename,
|  | const EST_PredictionSuffixTree::EST_filetype | type = PredictionSuffixTree_ascii )

Definition at line 328 of file EST_PST.cc.

## build() [1/2]

void EST_PredictionSuffixTree::build | ( | const EST_String | filename,
|  | const EST_String | prev,
|  | const EST_String | prev_prev,
|  | const EST_String | last )

Definition at line 397 of file EST_PST.cc.

## build() [2/2]

void EST_PredictionSuffixTree::build | ( | const EST_StrList & | input | ) |

Definition at line 436 of file EST_PST.cc.

## test()

void EST_PredictionSuffixTree::test | ( | const EST_String | filename | ) |

Definition at line 462 of file EST_PST.cc.

## print_freqs()

void EST_PredictionSuffixTree::print_freqs | ( | ostream & | os | ) |

Definition at line 308 of file EST_PST.cc.

## print_probs()

void EST_PredictionSuffixTree::print_probs | ( | ostream & | os | ) |

Definition at line 318 of file EST_PST.cc.

## predict() [1/3]

const EST_String & EST_PredictionSuffixTree::predict | ( | const EST_StrVector & | words | ) | const

Definition at line 259 of file EST_PST.cc.

## predict() [2/3]

const EST_String & EST_PredictionSuffixTree::predict | ( | const EST_StrVector & | words,
|  | double * | prob ) const

Definition at line 267 of file EST_PST.cc.

## predict() [3/3]

const EST_String & EST_PredictionSuffixTree::predict | ( | const EST_StrVector & | words,
|  | double * | prob,
|  | int * | state ) const

Definition at line 274 of file EST_PST.cc.

## prob_dist()

const EST_DiscreteProbDistribution & EST_PredictionSuffixTree::prob_dist | ( | const EST_StrVector & | words | ) | const

inline

Definition at line 140 of file EST_PST.h.

## rev_prob() [1/2]

double EST_PredictionSuffixTree::rev_prob | ( | const EST_StrVector & | words | ) | const

Definition at line 239 of file EST_PST.cc.

## rev_prob() [2/2]

double EST_PredictionSuffixTree::rev_prob | ( | const EST_StrVector & | words,
|  | const EST_DiscreteProbDistribution & | pd ) const

Definition at line 250 of file EST_PST.cc.

## Member Data Documentation

## p_order

int EST_PredictionSuffixTree::p_order

protected

Definition at line 91 of file EST_PST.h.

## num_states

int EST_PredictionSuffixTree::num_states

protected

Definition at line 92 of file EST_PST.h.

## nodes

EST_PredictionSuffixTree_tree_node* EST_PredictionSuffixTree::nodes

protected

Definition at line 93 of file EST_PST.h.

## pd

EST_DiscreteProbDistribution* EST_PredictionSuffixTree::pd

protected

Definition at line 94 of file EST_PST.h.

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

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