标签:struct TokenSet 代码 pri state instances NetInst StartRecognition 解析
在此之前的十几篇Blog都是在介绍HTK的词典、词格网络、识别Phone网络、HMM参数训练过程等,都是为了在识别时有据可循。
现在开始讲解,如何一步一步的将观察序列幻化为人可理解的文本。StartRecognition函数是这个过程的开端。
首先说这个函数是为了完成识别器的初始化工作,获取pri,即为私有识别信息,它是vri的一项数据,而vri又是从哪来的呢?它包含哪些数据呢?可以看出在StartRecognition函数之前还有些初始化工作,否则就得建立vri和pri等。这些信息暂且不表。
然后就是各种设置初始值。net->chain的所有节点的inst都为NULL;其中pri->psi涉及的计算值都为-1.
最后,调用AttachInst函数,完成net初始化。
1)new一个NetInst,加入到net->initial的NetInst数据项;
2)将该Inst追加到pri的tail后面;
3)并且重新组织Inst,表示下一步要传递的节点。
/* The instances actually store tokens and links etc */
/* Instances are stored in creation/token propagation order to allow */
/* null/word/tee instances to be connected together and still do propagation */
/* in one pass. Only HMMs need extra tokens, others are 1 state */
struct _NetInst
{
struct _NetInst *link; /* Doubly linked list of instances, forward */
struct _NetInst *knil; /* Doubly linked list of instances, backward */
NetNode *node; /* Position of instance within network */
int flags; /* Flags, active ... */
TokenSet *state; /* TokenSet[0..N-2] in state [1..N-1] for hmm */
TokenSet *exit; /* TokenSet in exit state */
LogFloat wdlk; /* Max likelihood of t=0 path to word end node */
LogFloat max; /* Likelihood for pruning of instance */
Boolean pxd; /* External propagation done this frame */
Boolean ooo; /* Instance potentially out of order */
#ifdef SANITY
int ipos;
#endif
};
标签:struct,TokenSet,代码,pri,state,instances,NetInst,StartRecognition,解析 来源: https://blog.csdn.net/hjx5200/article/details/117918730
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。