/** * Goes through the active list of tokens and expands each token, finding * the set of successor tokens until all the successor tokens are emitting * tokens. */ protected void growBranches() { int mapSize = activeList.size() * 10; if (mapSize == 0) { mapSize = 1; } growTimer.start(); bestTokenMap = new Dictionary <SearchState, Token>(mapSize); ActiveList oldActiveList = activeList; resultList = new List <Token>(); activeList = activeListFactory.newInstance(); threshold = oldActiveList.getBeamThreshold(); wordThreshold = oldActiveList.getBestScore() + logRelativeWordBeamWidth; var tokens = JavaToCs.GetTokenCollection(oldActiveList); foreach (Token token in tokens) { collectSuccessorTokens(token); } growTimer.stop(); if (logger.IsInfoEnabled) { int hmms = activeList.size(); totalHmms += hmms; logger.Info("Frame: " + currentFrameNumber + " Hmms: " + hmms + " total " + totalHmms); } }
protected internal virtual void growBranches() { int num = this.activeList.size() * 10; if (num == 0) { num = 1; } this.growTimer.start(); this.bestTokenMap = new HashMap(num); ActiveList activeList = this.activeList; this.resultList = new LinkedList(); this.activeList = this.activeListFactory.newInstance(); this.threshold = activeList.getBeamThreshold(); this.wordThreshold = activeList.getBestScore() + this.logRelativeWordBeamWidth; Iterator iterator = activeList.iterator(); while (iterator.hasNext()) { Token token = (Token)iterator.next(); this.collectSuccessorTokens(token); } this.growTimer.stop(); if (this.logger.isLoggable(Level.FINE)) { int num2 = this.activeList.size(); this.totalHmms += num2; this.logger.fine(new StringBuilder().append("Frame: ").append(this.currentFrameNumber).append(" Hmms: ").append(num2).append(" total ").append(this.totalHmms).toString()); } }