protected void AttachState(SentenceHMMState prevState, SentenceHMMState nextState, float logLanguageProbability, float logInsertionProbability) { var arc = new SentenceHMMStateArc (nextState, logLanguageProbability, logInsertionProbability); prevState.Connect(arc); }
/** * /// Attaches one SentenceHMMState as a child to another, the transition has the given probability * * /// @param prevState the parent state * /// @param nextState the child state * /// @param logLanguageProbablity the language probability of transition in the LogMath log domain * /// @param logInsertionProbablity insertion probability of transition in the LogMath log domain */ protected void AttachState(SentenceHMMState prevState, SentenceHMMState nextState, float logLanguageProbablity, float logInsertionProbablity) { prevState.Connect(_parent.GetArc(nextState, logLanguageProbablity, logInsertionProbablity)); if (_parent._showCompilationProgress && _parent._totalStateCounter++ % 1000 == 0) { this.LogInfo("."); } }
/// <summary> /// connect all the states in the source list to the states in the destination list /// </summary> /// <param name="sourceList">the set of source states</param> /// <param name="destList">the set of destination states.</param> /// <param name="logLangProb"></param> private void Connect(List <ISearchState> sourceList, List <ISearchState> destList, float logLangProb) { foreach (ISearchState source in sourceList) { SentenceHMMState sourceState = (SentenceHMMState)source; foreach (ISearchState dest in destList) { SentenceHMMState destState = (SentenceHMMState)dest; sourceState.Connect(_parent.GetArc(destState, logLangProb, LogOne)); _exitConnections++; } } }