/** * /// 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.getTokens()) { var curToken = token.getPredecessor(); // remove the final states that are not the real final ones because they're just hide prior final tokens: while (curToken.getPredecessor() != null && ( (curToken.isFinal() && curToken.getPredecessor() != null && !curToken.getPredecessor().isFinal()) || (curToken.isEmitting() && curToken.getData() == null) || // the so long not scored tokens (!curToken.isFinal() && !curToken.isEmitting()))) { curToken = curToken.getPredecessor(); } fixedList.add(curToken); } return(fixedList); }
/** * /// Clears emitting list in manager */ override public void clearEmittingList() { ActiveList list = currentActiveLists[currentActiveLists.Length - 1]; currentActiveLists[currentActiveLists.Length - 1] = list.newInstance(); }