Пример #1
0
        /*
         * (non-Javadoc)
         * @see edu.cmu.sphinx.decoder.search.SearchManager#allocate()
         */
        //@Override
        public override 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");
        }