Edinburgh Speech Tools  2.1-release
Lattice Class Reference

#include <include/EST_lattice.h>

Collaboration diagram for Lattice:

Classes

struct  Arc
 
struct  Node
 
struct  symbol_t
 

Public Member Functions

 Lattice ()
 
 ~Lattice ()
 
bool determinise ()
 
bool prune ()
 
bool minimise ()
 
bool expand ()
 
Nodestart_node ()
 
bool accepts (EST_TList< symbol_t * > &string)
 
float viterbi_transduce (EST_TList< EST_String > &input, EST_TList< Arc * > &path, EST_Litem *current_symbol=NULL, Node *start_node=NULL)
 
float viterbi_transduce (EST_Track &observations, EST_TList< Arc * > &path, float &score, ssize_t current_frame=0, Node *start_node=NULL)
 
float qmap_index_to_value (int index)
 
int qmap_value_to_index (float value)
 
EST_String nmap_index_to_name (int index)
 
int nmap_name_to_index (const EST_String &name)
 
symbol_talphabet_index_to_symbol (int index)
 
int alphabet_symbol_to_index (symbol_t *sym)
 

Protected Member Functions

EST_String name_as_string (EST_IList &l)
 
int alphabet_index_lookup (int nmap_index, int qmap_index)
 
bool final (Node *n)
 
bool build_transition_function ()
 
bool build_distinguished_state_table (bool **&dst)
 
bool build_distinguished_state_table_direct (bool **&dst)
 
bool build_distinguished_state_table_from_transition_function (bool **&dst)
 
void sort_arc_lists ()
 
bool link (Node *n1, Node *n2, int label)
 
void merge_nodes (EST_TList< Node * > &l)
 
void merge_arcs ()
 
void prune_arc (Node *node, Arc *arc)
 
void prune_arcs (Node *node, EST_TList< Arc * > arcs)
 
void remove_arc_from_nodes_out_list (Node *n, Arc *a)
 
int node_index (Node *n)
 

Protected Attributes

float qmap_error_margin
 
EST_FVector qmap
 
EST_TVector< EST_Stringnmap
 
EST_TVector< symbol_talphabet
 
int e_move_symbol_index
 
EST_TList< Node * > nodes
 
EST_TList< Node * > final_nodes
 
int ** tf
 

Friends

class Lattice_Language_Model
 
ostream & operator<< (ostream &s, const Lattice::symbol_t &sy)
 
ostream & operator<< (ostream &s, const Lattice::Node &n)
 
ostream & operator<< (ostream &s, const Lattice::Arc &n)
 
bool save (Lattice &lattice, EST_String filename)
 
bool load (Lattice &lattice, EST_String filename)
 

Detailed Description

Definition at line 47 of file EST_lattice.h.

Constructor & Destructor Documentation

Lattice::Lattice ( )

Definition at line 46 of file EST_lattice.cc.

Lattice::~Lattice ( )

Definition at line 54 of file EST_lattice.cc.

Member Function Documentation

EST_String Lattice::name_as_string ( EST_IList l)
protected

Definition at line 1506 of file EST_lattice.cc.

int Lattice::alphabet_index_lookup ( int  nmap_index,
int  qmap_index 
)
protected

Definition at line 1519 of file EST_lattice.cc.

bool Lattice::final ( Node n)
protected

Definition at line 1494 of file EST_lattice.cc.

bool Lattice::build_transition_function ( )
protected

Definition at line 1599 of file EST_lattice.cc.

bool Lattice::build_distinguished_state_table ( bool **&  dst)
protected

Definition at line 717 of file EST_lattice.cc.

bool Lattice::build_distinguished_state_table_direct ( bool **&  dst)
protected

Definition at line 782 of file EST_lattice.cc.

bool Lattice::build_distinguished_state_table_from_transition_function ( bool **&  dst)
protected

Definition at line 868 of file EST_lattice.cc.

void Lattice::sort_arc_lists ( )
protected

Definition at line 695 of file EST_lattice.cc.

bool Lattice::link ( Node n1,
Node n2,
int  label 
)
protected

Definition at line 665 of file EST_lattice.cc.

void Lattice::merge_nodes ( EST_TList< Node * > &  l)
protected

Definition at line 1064 of file EST_lattice.cc.

void Lattice::merge_arcs ( )
protected

Definition at line 1118 of file EST_lattice.cc.

void Lattice::prune_arc ( Node node,
Arc arc 
)
protected

Definition at line 1181 of file EST_lattice.cc.

void Lattice::prune_arcs ( Node node,
EST_TList< Arc * >  arcs 
)
protected

Definition at line 1167 of file EST_lattice.cc.

void Lattice::remove_arc_from_nodes_out_list ( Node n,
Arc a 
)
protected

Definition at line 1199 of file EST_lattice.cc.

int Lattice::node_index ( Node n)
protected

Definition at line 1346 of file EST_lattice.cc.

bool Lattice::determinise ( )

Definition at line 432 of file EST_lattice.cc.

bool Lattice::prune ( )
bool Lattice::minimise ( )

Definition at line 922 of file EST_lattice.cc.

bool Lattice::expand ( )

Definition at line 1364 of file EST_lattice.cc.

Lattice::Node * Lattice::start_node ( )

Definition at line 60 of file EST_lattice.cc.

bool Lattice::accepts ( EST_TList< symbol_t * > &  string)

Definition at line 1652 of file EST_lattice.cc.

float Lattice::viterbi_transduce ( EST_TList< EST_String > &  input,
EST_TList< Arc * > &  path,
EST_Litem current_symbol = NULL,
Node start_node = NULL 
)

Definition at line 1660 of file EST_lattice.cc.

float Lattice::viterbi_transduce ( EST_Track observations,
EST_TList< Arc * > &  path,
float &  score,
ssize_t  current_frame = 0,
Node start_node = NULL 
)

Definition at line 1712 of file EST_lattice.cc.

float Lattice::qmap_index_to_value ( int  index)

Definition at line 1297 of file EST_lattice.cc.

int Lattice::qmap_value_to_index ( float  value)

Definition at line 1309 of file EST_lattice.cc.

EST_String Lattice::nmap_index_to_name ( int  index)

Definition at line 1233 of file EST_lattice.cc.

int Lattice::nmap_name_to_index ( const EST_String name)

Definition at line 1245 of file EST_lattice.cc.

Lattice::symbol_t * Lattice::alphabet_index_to_symbol ( int  index)

Definition at line 1530 of file EST_lattice.cc.

int Lattice::alphabet_symbol_to_index ( Lattice::symbol_t sym)

Definition at line 1542 of file EST_lattice.cc.

Friends And Related Function Documentation

friend class Lattice_Language_Model
friend

Definition at line 200 of file EST_lattice.h.

ostream& operator<< ( ostream &  s,
const Lattice::symbol_t sy 
)
friend

Definition at line 305 of file EST_lattice.h.

ostream& operator<< ( ostream &  s,
const Lattice::Node n 
)
friend

Definition at line 312 of file EST_lattice.h.

ostream& operator<< ( ostream &  s,
const Lattice::Arc n 
)
friend

Definition at line 318 of file EST_lattice.h.

bool save ( Lattice lattice,
EST_String  filename 
)
friend

Definition at line 49 of file EST_lattice_io.cc.

bool load ( Lattice lattice,
EST_String  filename 
)
friend

Definition at line 133 of file EST_lattice_io.cc.

Member Data Documentation

float Lattice::qmap_error_margin
protected

Definition at line 100 of file EST_lattice.h.

EST_FVector Lattice::qmap
protected

Definition at line 103 of file EST_lattice.h.

EST_TVector<EST_String> Lattice::nmap
protected

Definition at line 106 of file EST_lattice.h.

EST_TVector<symbol_t> Lattice::alphabet
protected

Definition at line 112 of file EST_lattice.h.

int Lattice::e_move_symbol_index
protected

Definition at line 113 of file EST_lattice.h.

EST_TList<Node*> Lattice::nodes
protected

Definition at line 125 of file EST_lattice.h.

EST_TList<Node*> Lattice::final_nodes
protected

Definition at line 129 of file EST_lattice.h.

int** Lattice::tf
protected

Definition at line 135 of file EST_lattice.h.


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