/** * Performs the recognition for the given number of frames. * * @param nFrames * the number of frames to recognize * @return the current result or null if there is no Result (due to the lack * of frames to recognize) */ //@Override public override Result recognize(int nFrames) { bool done = false; Result result = null; streamEnd = false; for (int i = 0; i < nFrames && !done; i++) { done = recognize(); } // generate a new temporary result if the current token is based on a // final search state // remark: the first check for not null is necessary in cases that the // search space does not contain scoreable tokens. if (activeList.getBestToken() != null) { // to make the current result as correct as possible we undo the // last search graph expansion here ActiveList fixedList = undoLastGrowStep(); if (!streamEnd) { var jResultList = CsToJava.ConvertToJList(resultList); // now create the result using the fixed active-list result = new Result(fixedList, jResultList, currentFrameNumber, done, logMath); } } if (showTokenCountP) { showTokenCount(); } return(result); }
private void dumpList(ActiveList activeList) { [email protected](new StringBuilder().append("Size: ").append(activeList.size()).append(" Best token: ").append(activeList.getBestToken()).toString()); }