Exemple #1
0
        /*
         * /// (non-Javadoc)
         *
         * /// @see edu.cmu.sphinx.util.props.Configurable#newProperties(edu.cmu.sphinx.util.props.PropertySheet)
         */

        public override void newProperties(PropertySheet ps)
        {
            logMath = LogMath.getLogMath();

            linguist          = (Linguist.Linguist)ps.getComponent(PROP_LINGUIST);
            pruner            = (IPruner)ps.getComponent(PROP_PRUNER);
            scorer            = (IAcousticScorer)ps.getComponent(PROP_SCORER);
            activeListManager = (ActiveListManager)ps.getComponent(PROP_ACTIVE_LIST_MANAGER);
            _showTokenCount   = ps.getBoolean(PROP_SHOW_TOKEN_COUNT);
            growSkipInterval  = ps.getInt(PROP_GROW_SKIP_INTERVAL);

            _checkStateOrder        = ps.getBoolean(PROP_CHECK_STATE_ORDER);
            maxLatticeEdges         = ps.getInt(PROP_MAX_LATTICE_EDGES);
            acousticLookaheadFrames = ps.getFloat(PROP_ACOUSTIC_LOOKAHEAD_FRAMES);

            relativeBeamWidth = logMath.linearToLog(ps.getDouble(PROP_RELATIVE_BEAM_WIDTH));
        }
Exemple #2
0
        /**
         * ///
         * /// @param linguist
         * /// @param pruner
         * /// @param scorer
         * /// @param activeListManager
         * /// @param showTokenCount
         * /// @param relativeWordBeamWidth
         * /// @param growSkipInterval
         * /// @param checkStateOrder
         * /// @param buildWordLattice
         * /// @param maxLatticeEdges
         * /// @param acousticLookaheadFrames
         * /// @param keepAllTokens
         */
        public WordPruningBreadthFirstSearchManager(Linguist.Linguist linguist, IPruner pruner,
                                                    IAcousticScorer scorer, ActiveListManager activeListManager,
                                                    Boolean showTokenCount, double relativeWordBeamWidth,
                                                    int growSkipInterval,
                                                    Boolean checkStateOrder, Boolean buildWordLattice,
                                                    int maxLatticeEdges, float acousticLookaheadFrames,
                                                    Boolean keepAllTokens)
        {
            this.logMath                 = LogMath.getLogMath();
            this.linguist                = linguist;
            this.pruner                  = pruner;
            this.scorer                  = scorer;
            this.activeListManager       = activeListManager;
            this._showTokenCount         = showTokenCount;
            this.growSkipInterval        = growSkipInterval;
            this._checkStateOrder        = checkStateOrder;
            this.buildWordLattice        = buildWordLattice;
            this.maxLatticeEdges         = maxLatticeEdges;
            this.acousticLookaheadFrames = acousticLookaheadFrames;
            this.keepAllTokens           = keepAllTokens;

            this.relativeBeamWidth = logMath.linearToLog(relativeWordBeamWidth);
        }