Sautrela

edu.gtts.sautrela.wfsa
Interface WFSA<S extends State,Y extends Symbol,T extends Transition<S,Y>>

All Known Subinterfaces:
DWFSA<S,Y,T>, NdWFSA<S,Y,T>
All Known Implementing Classes:
CHMM, DefaultDWFSA, HMM, KTLSS, LMM, TreeModel

public interface WFSA<S extends State,Y extends Symbol,T extends Transition<S,Y>>

Weighted Finite-State Automata

Author:
mpenagar

Nested Class Summary
static interface WFSA.Factory
          WFSA instantiation Factory.
 
Method Summary
 void dumpTrainCounts()
          Dumps the trained data to the model.
 Alphabet<Y> getAlphabet()
          Returns the alphabet of the Model.
 double getFinProb(S state)
          Returns the probability of being final
 S getIniState()
          Returns the initial State
 java.lang.String getName()
          Returns the name of the Model.
 T getRandomTrans(S state)
          Returns a random transitions from a state
 T[] getTrans(S state)
          Returns all possible transitions from a state.
 void incrementTrainCount(S state, double count)
          Increments the training counts associated to a final state.
 void incrementTrainCount(T t, double count)
          Increments the training counts associated to a Transition.
 void initTrainCounts(double initCount)
          Initializes the training counts.
 java.lang.String toXML()
          Returns a XML representation of the WFSA
 

Method Detail

toXML

java.lang.String toXML()
Returns a XML representation of the WFSA


getName

java.lang.String getName()
Returns the name of the Model.

Returns:
The name of the Model

getAlphabet

Alphabet<Y> getAlphabet()
Returns the alphabet of the Model.

Returns:
The Alphabet

getIniState

S getIniState()
Returns the initial State

Returns:
The initial state

getFinProb

double getFinProb(S state)
Returns the probability of being final

Returns:
The probability of being final

getTrans

T[] getTrans(S state)
Returns all possible transitions from a state.

Parameters:
state - The source State
Returns:
an array containing all possible transitions from a state. If there is no transition, and empty array must be returned.

initTrainCounts

void initTrainCounts(double initCount)
                     throws java.lang.UnsupportedOperationException
Initializes the training counts. Al previous counts are cleared and initCount is used as initial posterior probability count of the WFSA (MAP training). This count must be distributed among all the internal parameters according to their prior probabilities.

Parameters:
initCount - initial posterior probability count
Throws:
java.lang.UnsupportedOperationException - if initCount!=0.0d and nonzero initialization is not supported

incrementTrainCount

void incrementTrainCount(S state,
                         double count)
Increments the training counts associated to a final state. These counts are related to the final probability of a State.

Parameters:
state - the final Sate
count - the training count.

incrementTrainCount

void incrementTrainCount(T t,
                         double count)
Increments the training counts associated to a Transition. These counts are related to the probability of a Transition.

Parameters:
t - the Transition
count - the training count.

dumpTrainCounts

void dumpTrainCounts()
Dumps the trained data to the model.


getRandomTrans

T getRandomTrans(S state)
Returns a random transitions from a state

Parameters:
state - The source State
Returns:
a random transition

Sautrela