Tanl Linguistic Pipeline

Tanl::POS::Viterbi Class Reference

This is the good old Viterbi algorithm for HMM decoding. More...

#include <Viterbi.h>

List of all members.

Classes

struct  Node

Public Member Functions

 Viterbi (HMM &hmm)
std::vector< Statedecode (double logtheta, State &startState, HMM::Observations &observations)
 logtheta is used for beam pruning.

Detailed Description

This is the good old Viterbi algorithm for HMM decoding.

Viterbi doesn't deal with the structure of an HMM. It only needs a start state and a black box that calculates the following states with transition and emission probabilities. The abstract class HMM provides a method

See also:
transitions to compute the set of Transition's from a given state and a given observation.

We do not have any trellis: at every step we only record the set of possible states with their weight and preceeding state. This structure is called Node. The nodes which have been reached at step t are stored in a map. The keys are states, the values are nodes. The type of states is parametric.


Member Function Documentation

vector< State > Tanl::POS::Viterbi::decode ( double  logtheta,
State startState,
HMM::Observations &  observations 
)

logtheta is used for beam pruning.

Returns:
the most probable state sequence from startState given the observation sequence observations.

References Tanl::POS::Viterbi::Node::from, and Tanl::POS::Viterbi::Node::weight.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
 
Copyright © 2005-2011 G. Attardi. Generated on 4 Mar 2011 by doxygen 1.6.1.