Esempio n. 1
0
        /**
         * /// Creates the emitting and non-emitting active lists. When creating the non-emitting active lists, we will look at
         * /// their respective beam widths (eg, word beam, unit beam, state beam).
         */
        private void createActiveLists()
        {
            int nlists = activeListFactories.Count;

            for (int i = 0; i < currentActiveLists.Length; i++)
            {
                int which = i;
                if (which >= nlists)
                {
                    which = nlists - 1;
                }
                ActiveListFactory alf = activeListFactories[which];
                currentActiveLists[i] = alf.newInstance();
            }
        }
Esempio n. 2
0
 /**
  * ///
  * /// @param linguist
  * /// @param pruner
  * /// @param scorer
  * /// @param activeListFactory
  * /// @param showTokenCount
  * /// @param relativeWordBeamWidth
  * /// @param growSkipInterval
  * /// @param wantEntryPruning
  */
 public SimpleBreadthFirstSearchManager(Linguist.Linguist linguist, IPruner pruner,
                                        IAcousticScorer scorer, ActiveListFactory activeListFactory,
                                        Boolean showTokenCount, double relativeWordBeamWidth,
                                        int growSkipInterval, Boolean wantEntryPruning)
 {
     this.name                     = GetType().Name;
     this.logMath                  = LogMath.getLogMath();
     this.linguist                 = linguist;
     this.pruner                   = pruner;
     this.scorer                   = scorer;
     this.activeListFactory        = activeListFactory;
     this._showTokenCount          = showTokenCount;
     this.growSkipInterval         = growSkipInterval;
     this.wantEntryPruning         = wantEntryPruning;
     this.logRelativeWordBeamWidth = logMath.linearToLog(relativeWordBeamWidth);
     this.keepAllTokens            = true;
 }
Esempio n. 3
0
        override public void newProperties(PropertySheet ps)
        {
            logMath = LogMath.getLogMath();
            name    = ps.InstanceName;

            linguist          = (Linguist.Linguist)ps.getComponent(PROP_LINGUIST);
            pruner            = (IPruner)ps.getComponent(PROP_PRUNER);
            scorer            = (IAcousticScorer)ps.getComponent(PROP_SCORER);
            activeListFactory = (ActiveListFactory)ps.getComponent(PROP_ACTIVE_LIST_FACTORY);
            _showTokenCount   = ps.getBoolean(PROP_SHOW_TOKEN_COUNT);

            double relativeWordBeamWidth = ps.getDouble(PROP_RELATIVE_WORD_BEAM_WIDTH);

            growSkipInterval         = ps.getInt(PROP_GROW_SKIP_INTERVAL);
            wantEntryPruning         = ps.getBoolean(PROP_WANT_ENTRY_PRUNING);
            logRelativeWordBeamWidth = logMath.linearToLog(relativeWordBeamWidth);

            this.keepAllTokens = true;
        }