Пример #1
0
 /**
  *
  * @param logMath
  * @param linguist
  * @param pruner
  * @param scorer
  * @param activeListFactory
  * @param showTokenCount
  * @param relativeWordBeamWidth
  * @param growSkipInterval
  * @param wantEntryPruning
  */
 public AlignerSearchManager(LogMath logMath, edu.cmu.sphinx.linguist.Linguist linguist,
                             Pruner pruner, AcousticScorer scorer,
                             ActiveListFactory activeListFactory, bool showTokenCount,
                             double relativeWordBeamWidth, int growSkipInterval,
                             bool wantEntryPruning)
 {
     this.name                     = getClass().getName();
     this.logger                   = LogManager.GetLogger(name);
     this.logMath                  = logMath;
     this.linguist                 = linguist;
     this.pruner                   = pruner;
     this.scorer                   = scorer;
     this.activeListFactory        = activeListFactory;
     this.showTokenCountP          = showTokenCount;
     this.growSkipInterval         = growSkipInterval;
     this.wantEntryPruning         = wantEntryPruning;
     this.logRelativeWordBeamWidth = logMath
                                     .linearToLog(relativeWordBeamWidth);
     this.keepAllTokens  = false;
     this.phraseWordList = new List <String>();
 }
Пример #2
0
        //@Override
        public override void newProperties(PropertySheet ps)
        {
            base.newProperties(ps);

            //logger = ps.getLogger();
            name = ps.getInstanceName();

            logMath = (LogMath)ps.getComponent(PROP_LOG_MATH);

            linguist          = (edu.cmu.sphinx.linguist.Linguist)ps.getComponent(PROP_LINGUIST);
            pruner            = (Pruner)ps.getComponent(PROP_PRUNER);
            scorer            = (AcousticScorer)ps.getComponent(PROP_SCORER);
            activeListFactory = (ActiveListFactory)ps
                                .getComponent(PROP_ACTIVE_LIST_FACTORY);
            showTokenCountP = JavaToCs.ConvertBool(ps.getBoolean(PROP_SHOW_TOKEN_COUNT));

            double relativeWordBeamWidth = ps.getDouble(PROP_RELATIVE_WORD_BEAM_WIDTH);

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

            this.keepAllTokens = true;
        }