Beispiel #1
0
        /*
         * /// (non-Javadoc)
         *
         * /// @see edu.cmu.sphinx.decoder.search.SearchManager#allocate()
         */
        override public void allocate()
        {
            // tokenTracker = new TokenTracker();
            // tokenTypeTracker = new TokenTypeTracker();

            scoreTimer = TimerPool.getTimer(this, "Score");
            pruneTimer = TimerPool.getTimer(this, "Prune");
            growTimer  = TimerPool.getTimer(this, "Grow");

            totalTokensScored = StatisticsVariable.getStatisticsVariable("totalTokensScored");
            curTokensScored   = StatisticsVariable.getStatisticsVariable("curTokensScored");
            tokensCreated     = StatisticsVariable.getStatisticsVariable("tokensCreated");

            try
            {
                linguist.allocate();
                pruner.allocate();
                scorer.allocate();
            }
            catch (IOException e)
            {
                throw new SystemException("Allocation of search manager resources failed", e);
            }
        }
Beispiel #2
0
        /// <summary>
        /// @see Search.SearchManager#allocate()
        /// </summary>
        override public void allocate()
        {
            totalTokensScored = StatisticsVariable.getStatisticsVariable("totalTokensScored");
            tokensPerSecond   = StatisticsVariable.getStatisticsVariable("tokensScoredPerSecond");
            curTokensScored   = StatisticsVariable.getStatisticsVariable("curTokensScored");
            tokensCreated     = StatisticsVariable.getStatisticsVariable("tokensCreated");
            viterbiPruned     = StatisticsVariable.getStatisticsVariable("viterbiPruned");
            beamPruned        = StatisticsVariable.getStatisticsVariable("beamPruned");

            try
            {
                linguist.allocate();
                pruner.allocate();
                scorer.allocate();
            }
            catch (IOException e)
            {
                throw new SystemException("Allocation of search manager resources failed", e);
            }

            scoreTimer = TimerPool.getTimer(this, "Score");
            pruneTimer = TimerPool.getTimer(this, "Prune");
            growTimer  = TimerPool.getTimer(this, "Grow");
        }