Core Extension Layer


Datatypes



typedef State State
 A state in a transducer.
typedef Transition Transition
 A transition between two states.
typedef TransitionIterator TransitionIterator
 A transition iterator over all transitions leaving from a state.

Defining states



State create_state (TransducerHandle t)
 Create a state in transducer t.
State set_final_state (State s, TransducerHandle t, float w=0)
 Set the state s in transducer t as final with weight w.

Defining transitions



void define_transition (TransducerHandle t, State orig, KeyPair *p, State target, float w=0)
 Define a transition leaving from state orig in transducer t with key pair p, target state target and weight w.

Using states



State get_initial_state (TransducerHandle t)
 Get initial state from transducer t.
bool is_final_state (State s, TransducerHandle t)
 Whether state s in transducer t is final.
float get_final_weight (State s, TransducerHandle t)
 Get the final weight of state s in transducer t.

Using transitions



KeyPairget_transition_keypair (Transition tr)
 Get the key pair of transition tr.
State get_transition_to (Transition tr)
 Get the goal state of transition tr.
float get_transition_weight (Transition tr)
 Get the weight of transition tr.

Iterators over transitions



TransitionIterator begin_ti (TransducerHandle t, State s)
 A transition iterator over transitions leaving from state s in transducer t.
void next_ti (TransitionIterator &ti)
 Next transition in ti.
bool is_end_ti (TransitionIterator ti)
 Whether transition iterator ti has passed the last transition.
Transition get_ti_transition (TransitionIterator ti)
 Get the transition represented by transition iterator ti.
State set_marked_state (State s, TransducerHandle t)
 Set the state s in transducer t as marked.
State unset_marked_state (State s, TransducerHandle t)
 Unset the state s in transducer t as marked.
bool is_marked (State s, TransducerHandle t)
 Whether state s in transducer t has been marked.

Detailed Description

Datatypes and functions related to manipulation of transducer states and transitions.

Typedef Documentation

typedef State State

A state in a transducer.

Definition at line 16 of file core-extension-layer.h.

A transition between two states.

Definition at line 19 of file core-extension-layer.h.

A transition iterator over all transitions leaving from a state.

Definition at line 22 of file core-extension-layer.h.


Function Documentation

TransitionIterator begin_ti ( TransducerHandle  t,
State  s 
)

A transition iterator over transitions leaving from state s in transducer t.

Definition at line 6444 of file hofst.C.

State create_state ( TransducerHandle  t  ) 

Create a state in transducer t.

Definition at line 6381 of file hofst.C.

void define_transition ( TransducerHandle  t,
State  orig,
KeyPair p,
State  target,
float  w = 0 
)

Define a transition leaving from state orig in transducer t with key pair p, target state target and weight w.

Definition at line 6397 of file hofst.C.

float get_final_weight ( State  s,
TransducerHandle  t 
)

Get the final weight of state s in transducer t.

Precondition:
s is a final state.

Definition at line 6419 of file hofst.C.

State get_initial_state ( TransducerHandle  t  ) 

Get initial state from transducer t.

Definition at line 6407 of file hofst.C.

Transition get_ti_transition ( TransitionIterator  ti  ) 

Get the transition represented by transition iterator ti.

Definition at line 6458 of file hofst.C.

KeyPair* get_transition_keypair ( Transition  tr  ) 

Get the key pair of transition tr.

Definition at line 6427 of file hofst.C.

State get_transition_to ( Transition  tr  ) 

Get the goal state of transition tr.

Definition at line 6431 of file hofst.C.

float get_transition_weight ( Transition  tr  ) 

Get the weight of transition tr.

Definition at line 6437 of file hofst.C.

bool is_end_ti ( TransitionIterator  ti  ) 

Whether transition iterator ti has passed the last transition.

Definition at line 6454 of file hofst.C.

bool is_final_state ( State  s,
TransducerHandle  t 
)

Whether state s in transducer t is final.

Definition at line 6414 of file hofst.C.

bool is_marked ( State  s,
TransducerHandle  t 
)

Whether state s in transducer t has been marked.

Definition at line 6496 of file hofst.C.

void next_ti ( TransitionIterator ti  ) 

Next transition in ti.

Definition at line 6450 of file hofst.C.

State set_final_state ( State  s,
TransducerHandle  t,
float  w = 0 
)

Set the state s in transducer t as final with weight w.

Definition at line 6388 of file hofst.C.

State set_marked_state ( State  s,
TransducerHandle  t 
)

Set the state s in transducer t as marked.

Definition at line 6465 of file hofst.C.

State unset_marked_state ( State  s,
TransducerHandle  t 
)

Unset the state s in transducer t as marked.

Definition at line 6481 of file hofst.C.


Generated on Tue Sep 29 11:43:34 2009 for Helsinki Finite-State Transducer Technology (HFST) interface by  doxygen 1.5.8