52 static LISP tl_find_l_w(LISP rules);
53 static int production_index(LISP state,
60 LISP l_w,letters,
words;
64 l_w = tl_find_l_w(rules);
72 static LISP tl_find_l_w(LISP rules)
77 for (r=rules; r !=
NIL; r=
cdr(r))
94 return cons(letters,words);
109 init(inalpha,outalpha);
118 for (w=wlist; w; w=
cdr(w))
122 for (cs=p_start_state,l=
car(w); l; l=
cdr(l))
132 ->add_transition(weight,
149 ns = production_index(
cdr(l),index,p_num_states);
150 if (ns == p_num_states)
153 ->add_transition(weight,
172 static int production_index(LISP
state,
187 ns = index.
val(istring,found);
LISP siod_last(LISP list)
float get_c_float(LISP x)
int add_state(enum wfst_state_type state_type)
Add a new state, returns new name.
an internal class for EST_WFST for representing transitions in an WFST
a call representing a weighted finite-state transducer
void clear()
clear removing existing states if any
int out_epsilon() const
Internal index for output epsilon.
const EST_String & name(const int n) const
The name given the index.
A specialised hash table for when the key is an EST_String.
int index(EST_TList< T > &l, T &val, bool(*eq)(const EST_UItem *, const EST_UItem *)=NULL)
LISP siod_nth(int nth, LISP list)
void tlcompile(LISP tl, EST_WFST &all_wfst)
void stop_cumulate()
Stop cumulation and calculate probabilities on transitions.
const char * get_c_string(LISP x)
LISP cons(LISP x, LISP y)
V & val(const EST_String &key, int &found) const
void build_tree_lex(LISP inalpha, LISP outalpha, LISP wlist)
const EST_WFST_State * state(int i) const
Return internal state information.
section options Options< strong > or ngram_per_line Pseudo words
int add_item(const EST_String &key, const V &value, int no_search=0)
Add an entry to the table.
int in_epsilon() const
Internal index for input epsilon.
EST_WFST_Transition * find_transition(int state, int in, int out) const
Find (first) transition given in and out symbols.
void init(int init_num_states=10)
Clear with (estimation of number of states required)
LISP siod_member_str(const char *key, LISP list)