/* * (non-Javadoc) * * @see * edu.cmu.sphinx.util.props.Configurable#newProperties(edu.cmu.sphinx.util * .props.PropertySheet) */ public override void NewProperties(PropertySheet ps) { base.NewProperties(ps); BaseUrl = ConfigurationManagerUtils.GetResource(PropBaseGrammarUrl, ps); //logger = ps.getLogger(); GrammarName = ps.GetString(PropGrammarName); LoadGrammar = true; }
public void NewProperties(PropertySheet ps) { Init(ConfigurationManagerUtils.GetResource(PropLocation, ps), ps.GetString(PropModel), ps.GetString(PropDataLocation), (UnitManager)ps.GetComponent(PropUnitManager), ps.GetFloat(PropMcFloor), ps.GetFloat(PropMwFloor), ps.GetFloat(PropVarianceFloor), ps.GetInt(PropTopn), ps.GetBoolean(PropUseCdUnits)); }
/* * (non-Javadoc) * * @see * edu.cmu.sphinx.util.props.Configurable#newProperties(edu.cmu.sphinx.util * .props.PropertySheet) */ public override void NewProperties(PropertySheet ps) { wordDictionaryFile = ConfigurationManagerUtils.GetResource(PropDictionary, ps); fillerDictionaryFile = ConfigurationManagerUtils.GetResource(PropFillerDictionary, ps); addendaUrlList = ps.GetResourceList(PropAddenda); wordReplacement = ps.GetString(PropWordReplacement); unitManager = (UnitManager)ps.GetComponent(PropUnitManager); g2pModelFile = ConfigurationManagerUtils.GetResource(PropG2PModelPath, ps); g2pMaxPron = ps.GetInt(PropG2PMaxPronunciations); }
/* * (non-Javadoc) * @see * edu.cmu.sphinx.util.props.Configurable#newProperties(edu.cmu.sphinx. * util.props.PropertySheet) */ public override void NewProperties(PropertySheet ps) { Location = ConfigurationManagerUtils.GetResource(PropLocation, ps); NgramLogFile = ps.GetString(PropQueryLogFile); NgramCacheSize = ps.GetInt(PropNgramCacheSize); ClearCacheAfterUtterance = ps.GetBoolean(PropClearCachesAfterUtterance); MaxDepth = ps.GetInt(PropMaxDepth); Dictionary = (IDictionary)ps.GetComponent(PropDictionary); ApplyLanguageWeightAndWip = ps.GetBoolean(PropApplyLanguageWeightAndWip); LanguageWeight = ps.GetFloat(PropLanguageWeight); Wip = ps.GetDouble(PropWordInsertionProbability); UnigramWeight = ps.GetFloat(PropUnigramWeight); FullSmear = ps.GetBoolean(PropFullSmear); }
public override void NewProperties(PropertySheet ps) { logMath = LogMath.GetLogMath(); location = ConfigurationManagerUtils.GetResource(PropLocation, ps); ngramLogFile = ps.GetString(PROP_QUERY_LOG_FILE); MaxDepth = ps.GetInt(LanguageModel.PropMaxDepth); ngramCacheSize = ps.GetInt(PROP_NGRAM_CACHE_SIZE); clearCacheAfterUtterance = ps.GetBoolean(PROP_CLEAR_CACHES_AFTER_UTTERANCE); dictionary = (IDictionary)ps.GetComponent(PropDictionary); applyLanguageWeightAndWip = ps.GetBoolean(PROP_APPLY_LANGUAGE_WEIGHT_AND_WIP); languageWeight = ps.GetFloat(PROP_LANGUAGE_WEIGHT); logWip = logMath.LinearToLog(ps.GetDouble(PROP_WORD_INSERTION_PROBABILITY)); unigramWeight = ps.GetFloat(PropUnigramWeight); }
public override void NewProperties(PropertySheet ps) { _logMath = LogMath.GetLogMath(); if (_allocated) { throw new RuntimeException("Can't change properties after allocation"); } _urlLocation = ConfigurationManagerUtils.GetResource(PropLocation, ps); _unigramWeight = ps.GetFloat(PropUnigramWeight); _desiredMaxDepth = ps.GetInt(PropMaxDepth); _dictionary = (IDictionary)ps.GetComponent(PropDictionary); _map = new HashMap <WordSequence, Probability>(); _vocabulary = new HashSet <String>(); _tokens = new LinkedList <WordSequence>(); }
public override void NewProperties(PropertySheet ps) { base.NewProperties(ps); _mappingFile = ConfigurationManagerUtils.GetResource(PropMapFile, ps); }