Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

hmm_tagger Class Reference

The class hmm_tagger implements the syntactic analyzer and is the main class, which uses all the others. More...

#include <hmm_tagger.h>

Inheritance diagram for hmm_tagger:

Inheritance graph
[legend]
Collaboration diagram for hmm_tagger:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 hmm_tagger (const string &, const string &, bool)
 Constructor.
void analyze (list< sentence > &)
 analyze given sentences
list< sentenceanalyze (const list< sentence > &)
 analyze sentences and return analyzed copy

Private Member Functions

double ProbA_log (const string &, const string &) const
 Compute transition log_probability from state_i to state_j, returning appropriate smoothed values if no evidence is available.
double ProbB_log (const string &, const word &) const
 Compute emission log_probability for observation obs from state_i.
double ProbPi_log (const string &) const
 Compute initial log_probability for state_i.
list< emission_statesFindStates (const sentence &) const
 compute possible emission states for each word in sentence.

Private Attributes

string Language
map< string, double > PTag
 maps to store the probabilities
map< string, double > PBg
map< string, double > PTrg
map< string, double > PInitial
map< string, double > PWord
double c [3]
 coeficients to compute linear interpolation

Detailed Description

The class hmm_tagger implements the syntactic analyzer and is the main class, which uses all the others.


Constructor & Destructor Documentation

hmm_tagger::hmm_tagger const string &  ,
const string &  ,
bool 
 

Constructor.


Member Function Documentation

list< sentence > hmm_tagger::analyze const list< sentence > &   ) 
 

analyze sentences and return analyzed copy

void hmm_tagger::analyze list< sentence > &   )  [virtual]
 

analyze given sentences

Implements POS_tagger.

list< emission_states > hmm_tagger::FindStates const sentence  )  const [private]
 

compute possible emission states for each word in sentence.

double hmm_tagger::ProbA_log const string &  ,
const string & 
const [private]
 

Compute transition log_probability from state_i to state_j, returning appropriate smoothed values if no evidence is available.

double hmm_tagger::ProbB_log const string &  state_i,
const word obs
const [private]
 

Compute emission log_probability for observation obs from state_i.

Pb=P(state|word)*P(word)/P(state) approximating P(s|w) by: P(s|w)~=P(t3|w)*P(s)/P(t3) thus, Pb ~= P(t3|w)*P(w)/P(t3)

double hmm_tagger::ProbPi_log const string &   )  const [private]
 

Compute initial log_probability for state_i.


Member Data Documentation

double hmm_tagger::c[3] [private]
 

coeficients to compute linear interpolation

string hmm_tagger::Language [private]
 

map<string, double> hmm_tagger::PBg [private]
 

map<string, double> hmm_tagger::PInitial [private]
 

map<string, double> hmm_tagger::PTag [private]
 

maps to store the probabilities

map<string, double> hmm_tagger::PTrg [private]
 

map<string, double> hmm_tagger::PWord [private]
 


The documentation for this class was generated from the following files:
Generated on Wed Apr 26 12:58:13 2006 for FreeLing by  doxygen 1.4.4