com.aliasi.hmm
Interface HiddenMarkovModel

All Known Implementing Classes:
AbstractHmm, AbstractHmmEstimator, HmmCharLmEstimator

public interface HiddenMarkovModel

The HiddenMarkovModel interface provides a means for definining the probability estimates and symbol table underlying a hidden Markov model (HMM). Probabilities may be retrieved by symbol identifier or by string, and in either straight or log2 form. Hence the class looks a little more complicated than it is, because there are four variants of each method:

  by Tag Name by Tag Identifier
Linear startProb(String) startProb(int)
endProb(String) endProb(int)
transitProb(String,String) transitProb(int,int)
emitProb(String,CharSequence) emitProb(int,CharSequence)
Log startLog2Prob(String) startLog2Prob(int)
endLog2Prob(String) endLog2Prob(int)
transitLog2Prob(String,String) transitLog2Prob(int,int)
emitLog2Prob(String,CharSequence) emitLog2Prob(int,CharSequence)
In addition, the method stateSymbolTable() returns the symbol table for states.

Since:
LingPipe2.1
Version:
2.1
Author:
Bob Carpenter

Method Summary
 double emitLog2Prob(int stateId, CharSequence emission)
          Return the log (base 2) of the emission estimate.
 double emitLog2Prob(String state, CharSequence emission)
          Returns the log (base 2) of the emission estimate.
 double emitProb(int stateId, CharSequence emission)
          Return an estimate of the likelihood of the state with the specified identifier to emit the specified string.
 double emitProb(String state, CharSequence emission)
          Returns an estimate the emission of the specified string by the state with the specified label.
 double endLog2Prob(int stateId)
          Returns the log (base 2) of the end probability for the state with the specified identifier.
 double endLog2Prob(String state)
          Returns the log (base 2) of the end probability for the specified state.
 double endProb(int stateId)
          Returns the end probability for the state with the specified identifier.
 double endProb(String state)
          Returns the end probability for the specified state.
 double startLog2Prob(int stateId)
          Returns the log (base 2) of the start probability for the state with the specified identifier.
 double startLog2Prob(String state)
          Returns the log (base 2) of the start probability for the specified state.
 double startProb(int stateId)
          Returns the start probability for the state with the specified identifier.
 double startProb(String state)
          Returns the start probability for the specified state.
 SymbolTable stateSymbolTable()
          Return the symbol table for the states for this HMM.
 double transitLog2Prob(int sourceId, int targetId)
          Returns the log (base 2) of the transition estimate.
 double transitLog2Prob(String source, String target)
          Returns the log (base 2) estimate of a transition probability.
 double transitProb(int sourceId, int targetId)
          Return an estimate of the transition likelihood from the source state with the specified identifier to the target state with the specified identifier.
 double transitProb(String source, String target)
          Returns an estimate of a transition from the source state with the specified name to the target state with the specified label.
 

Method Detail

stateSymbolTable

SymbolTable stateSymbolTable()
Return the symbol table for the states for this HMM.

Returns:
The symbol table for the states for this HMM.

startProb

double startProb(int stateId)
Returns the start probability for the state with the specified identifier.

Parameters:
stateId - Identifier of state.
Returns:
Start probability of state with specified identifier.

startProb

double startProb(String state)
Returns the start probability for the specified state.

Parameters:
state - HMM state.
Returns:
Start probability of specified state.

startLog2Prob

double startLog2Prob(int stateId)
Returns the log (base 2) of the start probability for the state with the specified identifier.

Parameters:
stateId - Identifier of state.
Returns:
Start probability of state with specified identifier.

startLog2Prob

double startLog2Prob(String state)
Returns the log (base 2) of the start probability for the specified state.

Parameters:
state - HMM State.
Returns:
Log start probability of state.

endProb

double endProb(int stateId)
Returns the end probability for the state with the specified identifier.

Parameters:
stateId - Identifier of state.
Returns:
End probability of state with specified identifier.

endProb

double endProb(String state)
Returns the end probability for the specified state.

Parameters:
state - HMM state.
Returns:
End probability of specified state.

endLog2Prob

double endLog2Prob(int stateId)
Returns the log (base 2) of the end probability for the state with the specified identifier.

Parameters:
stateId - Identifier of state.
Returns:
End probability of state with specified identifier.

endLog2Prob

double endLog2Prob(String state)
Returns the log (base 2) of the end probability for the specified state.

Parameters:
state - HMM State.
Returns:
Log end probability of state.

transitProb

double transitProb(int sourceId,
                   int targetId)
Return an estimate of the transition likelihood from the source state with the specified identifier to the target state with the specified identifier.

Parameters:
sourceId - Source state identifier.
targetId - Target state identifier.
Returns:
Estimate of the transition probability.

transitLog2Prob

double transitLog2Prob(int sourceId,
                       int targetId)
Returns the log (base 2) of the transition estimate. See transitProb(int,int) for more information.

Parameters:
sourceId - Source state identifier.
targetId - Target state identifier.
Returns:
Estimate of the transition probability.

emitProb

double emitProb(int stateId,
                CharSequence emission)
Return an estimate of the likelihood of the state with the specified identifier to emit the specified string.

Parameters:
stateId - State identifier.
emission - Character sequence emitted.
Returns:
Estimate of probability of the specified state emitting the specified string.

emitLog2Prob

double emitLog2Prob(int stateId,
                    CharSequence emission)
Return the log (base 2) of the emission estimate. See emitProb(int,CharSequence) for more details.

Parameters:
stateId - State identifier.
emission - Character sequence emitted.
Returns:
Log (base 2) estimate of probability of the specified state emitting the specified string.

transitProb

double transitProb(String source,
                   String target)
Returns an estimate of a transition from the source state with the specified name to the target state with the specified label.

Parameters:
source - Label of source state.
target - Label of target state.
Returns:
Estimate of likelihood of transition from the source to the target state.

transitLog2Prob

double transitLog2Prob(String source,
                       String target)
Returns the log (base 2) estimate of a transition probability. See transitProb(String,String) for more information.

Parameters:
source - Label of source state.
target - Label of target state.
Returns:
Log (base 2) Estimate of likelihood of transition from the source to the target state.

emitProb

double emitProb(String state,
                CharSequence emission)
Returns an estimate the emission of the specified string by the state with the specified label.

Parameters:
state - Label of state.
emission - Character sequence emitted.
Returns:
Estimate of likelihood of the state emitting the string.

emitLog2Prob

double emitLog2Prob(String state,
                    CharSequence emission)
Returns the log (base 2) of the emission estimate. See emitProb(String,CharSequence) for more information.

Parameters:
state - Label of state.
emission - Character sequence emitted.
Returns:
Log (base 2) estimate of likelihood of the state emitting the string.