TRF Language Model
trf::AlgNode Class Reference

the forward-backward algorithms for TRF model More...

#include <trf-model.h>

Inheritance diagram for trf::AlgNode:
trf::Algfb

Public Member Functions

 AlgNode (Model *p)
 
virtual LogP ClusterSum (int *pSeq, int nLen, int nPos, int nOrder)
 This function need be derived. Calcualte the log probability of each cluster. More...
 
- Public Member Functions inherited from trf::Algfb
 Algfb ()
 
 ~Algfb ()
 
void Prepare (int nLen, int nOrder, int nValueLimit)
 prepare More...
 
void ForwardBackward (int nLen, int nOrder, int nValueLimit)
 forward-backward calculation More...
 
LogP GetMarginalLogProb (int nPos, int *pSubSeq, int nSubLen, double logz=0)
 Get the marginal probability. 'logz' is the input of the log normalization constants. More...
 
LogP GetLogSummation ()
 Get the summation over the sequence, corresponding to the log normalization constants 'logZ'. More...
 

Additional Inherited Members

- Public Attributes inherited from trf::Algfb
int m_nOrder
 the order, i.e. the node number at each cluster {x_1,x_2,...,x_n} More...
 
int m_nLen
 the sequence length. More...
 
int m_nValueLimit
 the max-value at each position More...
 
Array< Msg * > m_aAlpha
 the forward message More...
 
Array< Msg * > m_aBeta
 the backward message More...
 

Detailed Description

the forward-backward algorithms for TRF model

Definition at line 38 of file trf-model.h.

Constructor & Destructor Documentation

§ AlgNode()

trf::AlgNode::AlgNode ( Model p)
inline

Definition at line 44 of file trf-model.h.

Member Function Documentation

§ ClusterSum()

LogP trf::AlgNode::ClusterSum ( int *  pSeq,
int  nLen,
int  nPos,
int  nOrder 
)
virtual

This function need be derived. Calcualte the log probability of each cluster.

Implements trf::Algfb.

Definition at line 22 of file trf-model.cpp.


The documentation for this class was generated from the following files: