/** * /// Because the growBranches() is called although no data is left after the last speech frame, the ordering of the * /// active-list might depend on the transition probabilities and (penalty-scores) only. Therefore we need to undo the last * /// grow-step up to final states or the last emitting state in order to fix the list. * /// @return newly created list */ protected ActiveList UndoLastGrowStep() { var fixedList = ActiveList.NewInstance(); foreach (var token in ActiveList) { var curToken = token.Predecessor; // remove the final states that are not the real final ones because they're just hide prior final tokens: while (curToken.Predecessor != null && ( (curToken.IsFinal && curToken.Predecessor != null && !curToken.Predecessor.IsFinal) || (curToken.IsEmitting && curToken.Data == null) || // the so long not scored tokens (!curToken.IsFinal && !curToken.IsEmitting))) { curToken = curToken.Predecessor; } fixedList.Add(curToken); } return(fixedList); }
/** * /// Clears emitting list in manager */ public override void ClearEmittingList() { ActiveList list = CurrentActiveLists[CurrentActiveLists.Length - 1]; CurrentActiveLists[CurrentActiveLists.Length - 1] = list.NewInstance(); }