00001 #pragma once 00002 00003 #ifdef WIN32 00004 #if defined _USRDLL 00005 #define DllExport _declspec(dllexport) 00006 #else 00007 #define DllExport _declspec(dllimport) 00008 #endif 00009 #endif 00010 00011 #include "HLabHMM.h" 00012 #include "HLabFeat.h" 00013 #include "HLabConst.h" 00014 #include "HLabViterbi.h" 00015 00031 class DllExport CHLabWordViterbi 00032 { 00033 const CHLabHMM* m_pHMM; 00034 int m_iNumHMMs; 00035 std::vector<int> m_vecHMMIndex; 00036 const CHLabFeat* m_pFeat; 00037 CHLabViterbi* m_pViterbi; 00038 int m_iTI; 00039 00040 00041 public: 00042 CHLabWordViterbi(void); 00043 00044 00045 int Init(const CHLabHMM* pHMM, 00046 int iNumHMMs, 00047 std::vector<int> vecHMMIndex, 00048 const CHLabFeat* pFeat); 00049 00050 float Run(float* pfOutLikelihood, int* piOutBackPointer, 00051 float* pfHighestLikelihood, 00052 float fInLikelihood, int iInBackPointer, float fTH = -HLab_INFINITY); 00053 00054 virtual ~CHLabWordViterbi(void); 00055 };