Edinburgh Speech Tools  2.4-release
 All Classes Functions Variables Typedefs Enumerations Enumerator Friends Pages
EST_WFST Class Reference

#include <include/EST_WFST.h>

Public Member Functions

Constructor and initialisation functions
 EST_WFST ()
 ?
 
 EST_WFST (const EST_WFST &wfst)
 ?
 
 ~EST_WFST ()
 
Reseting functions
void init (int init_num_states=10)
 Clear with (estimation of number of states required)
 
void init (LISP in, LISP out)
 clear an initialise with given input and out alphabets
 
void copy (const EST_WFST &wfst)
 Copy from existing wfst.
 
void clear ()
 clear removing existing states if any
 
General utility functions
int num_states () const
 
int start_state () const
 
int in_symbol (const EST_String &s) const
 Map input symbol to input alphabet index.
 
const EST_Stringin_symbol (int i) const
 Map input alphabet index to input symbol.
 
int out_symbol (const EST_String &s) const
 Map output symbol to output alphabet index.
 
const EST_Stringout_symbol (int i) const
 Map output alphabet index to output symbol.
 
LISP epsilon_label () const
 LISP for on epsilon symbols.
 
int in_epsilon () const
 Internal index for input epsilon.
 
int out_epsilon () const
 Internal index for output epsilon.
 
const EST_WFST_Statestate (int i) const
 Return internal state information.
 
EST_WFST_Statestate_non_const (int i)
 Return internal state information (non-const)
 
int final (int i) const
 True if state { i} is final.
 
const EST_Discretein_symbols () const
 Accessing the input alphabet.
 
const EST_Discreteout_symbols () const
 Accessing the output alphabet.
 
file i/o
EST_write_status save (const EST_String &filename, const EST_String type="ascii")
 ?
 
EST_write_status save_binary (FILE *fd)
 
EST_read_status load (const EST_String &filename)
 ?
 
EST_read_status load_binary (FILE *fd, EST_Option &hinfo, int num_states, int swap)
 
transduction functions
int transition (int state, int in, int out) const
 Find (first) new state given in and out symbols.
 
int transition (int state, int in, int out, float &prob) const
 
EST_WFST_Transitionfind_transition (int state, int in, int out) const
 Find (first) transition given in and out symbols.
 
int transition (int state, const EST_String &in, const EST_String &out) const
 Find (first) new state given in and out strings.
 
int transition (int state, const EST_String &inout) const
 Find (first) new state given in/out string.
 
int transduce (int state, int in, int &out) const
 Transduce in to out from state.
 
int transduce (int state, const EST_String &in, EST_String &out) const
 Transduce in to out (strings) from state.
 
void transduce (int state, int in, wfst_translist &out) const
 Transduce in to list of transitions.
 
void transition_all (int state, int in, int out, EST_WFST_MultiState *ms) const
 Find all possible transitions for given state/input/output.
 
Cumulation functions for adding collective probabilities

for transitions from data

int cumulate () const
 Cumulation condition.
 
void start_cumulate ()
 Clear and start cumulation.
 
void stop_cumulate ()
 Stop cumulation and calculate probabilities on transitions.
 
WFST construction functions from external representations
int add_state (enum wfst_state_type state_type)
 Add a new state, returns new name.
 
enum wfst_state_type ms_type (EST_WFST_MultiState *ms) const
 Given a multi-state return type (final, ok, error)
 
void build_wfst (int start, int end, LISP regex)
 Basic regex constructor.
 
void build_and_transition (int start, int end, LISP conjunctions)
 Basic conjunction constructor.
 
void build_or_transition (int start, int end, LISP disjunctions)
 Basic disjunction constructor.
 
void build_from_regex (LISP inalpha, LISP outalpha, LISP regex)
 
void kkrule_compile (LISP inalpha, LISP outalpha, LISP fp, LISP rule, LISP sets)
 
void build_from_rg (LISP inalpha, LISP outalpha, LISP distinguished, LISP rewrites, LISP sets, LISP terms, int max_depth)
 
void build_tree_lex (LISP inalpha, LISP outalpha, LISP wlist)
 
Basic WFST operators
void determinize (const EST_WFST &a)
 Build determinized form of a.
 
void minimize (const EST_WFST &a)
 Build minimized form of a.
 
void complement (const EST_WFST &a)
 Build complement of a.
 
void intersection (EST_TList< EST_WFST > &wl)
 
void intersection (const EST_WFST &a, const EST_WFST &b)
 
void uunion (EST_TList< EST_WFST > &wl)
 
void uunion (const EST_WFST &a, const EST_WFST &b)
 
void compose (const EST_WFST &a, const EST_WFST &b)
 
void difference (const EST_WFST &a, const EST_WFST &b)
 
void concat (const EST_WFST &a, const EST_WFST &b)
 
construction support functions
int deterministic () const
 True if WFST is deterministic.
 
EST_WFST_MultiStateapply_multistate (const EST_WFST &wfst, EST_WFST_MultiState *ms, int in, int out) const
 Transduce a multi-state given n and out.
 
void add_epsilon_reachable (EST_WFST_MultiState *ms) const
 Extend multi-state with epsilon reachable states.
 
void remove_error_states (const EST_WFST &a)
 Remove error states from the WFST.
 
EST_String summary () const
 
EST_WFSToperator= (const EST_WFST &a)
 ?
 

Detailed Description

a call representing a weighted finite-state transducer

Definition at line 150 of file EST_WFST.h.

Member Function Documentation

void EST_WFST::intersection ( EST_TList< EST_WFST > &  wl)
Build intersection of all WFSTs in given list.  The new WFST

recognizes the only the strings that are recognized by all WFSTs in the given list

Definition at line 356 of file wfst_ops.cc.

void EST_WFST::intersection ( const EST_WFST a,
const EST_WFST b 
)
Build intersection of WFSTs a and b   The new WFST

recognizes the only the strings that are recognized by both a and b list

Definition at line 470 of file wfst_ops.cc.

void EST_WFST::uunion ( EST_TList< EST_WFST > &  wl)
Build union of all WFSTs in given list.  The new WFST 

recognizes the only the strings that are recognized by at least one WFSTs in the given list

void EST_WFST::uunion ( const EST_WFST a,
const EST_WFST b 
)
Build union of WFSTs a and b.  The new WFST 

recognizes the only the strings that are recognized by either a or b

Definition at line 717 of file wfst_ops.cc.

void EST_WFST::compose ( const EST_WFST a,
const EST_WFST b 
)

Build new WFST by composition of a and b. Outputs of a are fed to b, given a new WFSTs which has a's input language and b's output set. a's output and b's input alphabets must be the same

Definition at line 812 of file wfst_ops.cc.

void EST_WFST::difference ( const EST_WFST a,
const EST_WFST b 
)

Build WFST that accepts only strings in a that aren't also accepted by strings in b.

Definition at line 898 of file wfst_ops.cc.

void EST_WFST::concat ( const EST_WFST a,
const EST_WFST b 
)

Build WFST that accepts a language that consists of any string in a followed by any string in b

Definition at line 776 of file wfst_ops.cc.


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