예제 #1
0
 /*
  * /// (non-Javadoc)
  *
  * /// @see edu.cmu.sphinx.linguist.Linguist#allocate()
  */
 public override void Allocate()
 {
     AllocateAcousticModel();
     Grammar.Allocate();
     TotalStates       = StatisticsVariable.GetStatisticsVariable(Name, "totalStates");
     TotalArcs         = StatisticsVariable.GetStatisticsVariable(Name, "totalArcs");
     ActualArcs        = StatisticsVariable.GetStatisticsVariable(Name, "actualArcs");
     _stateSet         = CompileGrammar();
     TotalStates.Value = _stateSet.Count;
 }
예제 #2
0
        /// <summary>
        /// @see Search.SearchManager#allocate()
        /// </summary>
        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");
        }
        public override 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);
            }
        }