internal GrammarState(AFlatLinguist aflatLinguist, GrammarNode grammarNode, float num, int num2, int num3) : base(aflatLinguist) { this.lc = num2; this.nextBaseID = num3; this.node = grammarNode; this.languageProbability = num; }
public override float getInsertionProbability() { if (this.pronunciation.getWord().isFiller()) { return(0f); } return(AFlatLinguist.access_1100(this.this_0)); }
internal static long access_108(AFlatLinguist aflatLinguist) { long num = aflatLinguist.counterForMemoryLogging; long result = num; aflatLinguist.counterForMemoryLogging = num + 1L; return(result); }
public override SearchStateArc[] getSuccessors() { AFlatLinguist.access_108(this.this_0); ulong num = (ulong)AFlatLinguist.access_100(this.this_0); ulong num2 = (ulong)500000; if (((num2 != 18446744073709551615UL) ? (num % num2) : 0UL) == 0UL) { AFlatLinguist.access_200(this.this_0).info(new StringBuilder().append("Free Memory= ").append(this.this_0.runtime.freeMemory() / (long)((ulong)1048576)).append(" MB\tMax Memory= ").append(this.this_0.runtime.maxMemory() / (long)((ulong)1048576)).append("MB").toString()); } SearchStateArc[] array = this.getCachedSuccessors(); if (array == null) { if (this.isFinal()) { array = AFlatLinguist.access_300(this.this_0); } else if (this.node.isEmpty()) { array = this.getNextGrammarStates(this.lc, this.nextBaseID); } else { Word word = this.node.getWord(); Pronunciation[] array2 = word.getPronunciations(); array2 = this.filter(array2, this.nextBaseID); SearchStateArc[] array3; if (AFlatLinguist.access_400(this.this_0)) { array3 = new SearchStateArc[array2.Length + 1]; } else { array3 = new SearchStateArc[array2.Length]; } for (int i = 0; i < array2.Length; i++) { array3[i] = new AFlatLinguist.PronunciationState(this.this_0, this, array2[i]); } SearchStateArc[] toGrammarSearchState = new SearchStateArc[] { this }; if (AFlatLinguist.access_400(this.this_0)) { PhoneLoop phoneLoop = new PhoneLoop(AFlatLinguist.access_500(this.this_0), AFlatLinguist.access_600(this.this_0), AFlatLinguist.access_700(this.this_0), toGrammarSearchState); array3[array2.Length] = phoneLoop.getPhoneLoop(); } array = array3; } this.cacheSuccessors(array); } return(array); }
internal FullHMMSearchState(AFlatLinguist aflatLinguist, AFlatLinguist.PronunciationState pronunciationState, int num, int leftID, int rightID) : base(aflatLinguist) { this.pState = pronunciationState; this.index = num; this.lc = leftID; this.rc = rightID; int baseID = pronunciationState.getPronunciation().getUnits()[num].getBaseID(); int unitID = AFlatLinguist.access_800(aflatLinguist).buildID(baseID, leftID, rightID); this.hmm = AFlatLinguist.access_800(aflatLinguist).getHMM(unitID, this.getPosition()); this._isLastUnitOfWord = (num == pronunciationState.getPronunciation().getUnits().Length - 1); }
public override float getInsertionProbability() { Unit baseUnit = this.hmm.getBaseUnit(); if (baseUnit.isSilence()) { return(AFlatLinguist.access_1200(this.this_0)); } if (baseUnit.isFiller()) { return(AFlatLinguist.access_1300(this.this_0)); } return(AFlatLinguist.access_1400(this.this_0)); }
internal FullHMMSearchState(AFlatLinguist aflatLinguist, AFlatLinguist.PronunciationState pronunciationState, int num, int num2) : this(aflatLinguist, pronunciationState, num, num2, pronunciationState.getPronunciation().getUnits()[num + 1].getBaseID()) { }
internal HMMStateSearchState(AFlatLinguist aflatLinguist, AFlatLinguist.FullHMMSearchState fullHMMSearchState, HMMState hmmstate) : this(aflatLinguist, fullHMMSearchState, hmmstate, 0f) { }
internal virtual int[] getNextUnits() { return((int[])AFlatLinguist.access_1000(this.this_0).get(this.node)); }
internal static bool access_400(AFlatLinguist aflatLinguist) { return(aflatLinguist.addOutOfGrammarBranch); }
internal GrammarState(AFlatLinguist aflatLinguist, GrammarNode grammarNode, float num, int num2) : this(aflatLinguist, grammarNode, num, num2, 0) { }
internal static float access_1200(AFlatLinguist aflatLinguist) { return(aflatLinguist.logSilenceInsertionProbability); }
internal static Map access_1000(AFlatLinguist aflatLinguist) { return(aflatLinguist.nodeToNextUnitArrayMap); }
internal static Map access_900(AFlatLinguist aflatLinguist) { return(aflatLinguist.nodeToUnitSetMap); }
internal static HMMPool access_800(AFlatLinguist aflatLinguist) { return(aflatLinguist.hmmPool); }
internal static float access_700(AFlatLinguist aflatLinguist) { return(aflatLinguist.logPhoneInsertionProbability); }
internal static float access_600(AFlatLinguist aflatLinguist) { return(aflatLinguist.logOutOfGrammarBranchProbability); }
internal static AcousticModel access_500(AFlatLinguist aflatLinguist) { return(aflatLinguist.acousticModel); }
internal GrammarState(AFlatLinguist aflatLinguist, GrammarNode grammarNode) : this(aflatLinguist, grammarNode, 0f, UnitManager.__SILENCE.getBaseID()) { }
private bool hasEntryContext(GrammarNode grammarNode, int unitID) { Set set = (Set)AFlatLinguist.access_900(this.this_0).get(grammarNode); return(set.contains(AFlatLinguist.access_800(this.this_0).getUnit(unitID))); }
internal static float access_1300(AFlatLinguist aflatLinguist) { return(aflatLinguist.logFillerInsertionProbability); }
internal static SearchStateArc[] access_300(AFlatLinguist aflatLinguist) { return(aflatLinguist.EMPTY_ARCS); }
public override float getLanguageProbability() { return(this.languageProbability * AFlatLinguist.access_000(this.this_0)); }
internal static float access_1400(AFlatLinguist aflatLinguist) { return(aflatLinguist.logUnitInsertionProbability); }
public override string getSignature() { return(new StringBuilder().append("GS ").append(this.node).append("-lc-").append(AFlatLinguist.access_800(this.this_0).getUnit(this.lc)).append("-rc-").append(AFlatLinguist.access_800(this.this_0).getUnit(this.nextBaseID)).toString()); }
internal DynamicFlatSearchGraph(AFlatLinguist aflatLinguist) { this.this_0 = aflatLinguist; }
public override string toString() { return(new StringBuilder().append(this.node).append("[").append(AFlatLinguist.access_800(this.this_0).getUnit(this.lc)).append(',').append(AFlatLinguist.access_800(this.this_0).getUnit(this.nextBaseID)).append(']').toString()); }
public SearchState getInitialState() { AFlatLinguist.InitialState initialState = new AFlatLinguist.InitialState(this.this_0); initialState.addArc(new AFlatLinguist.GrammarState(this.this_0, AFlatLinguist.access_1500(this.this_0).getInitialNode())); return(initialState); }
internal HMMStateSearchState(AFlatLinguist aflatLinguist, AFlatLinguist.FullHMMSearchState fullHMMSearchState, HMMState hmmstate, float num) : base(aflatLinguist) { this.probability = num; this.fullHMMSearchState = fullHMMSearchState; this.hmmState = hmmstate; }
internal FlatSearchState(AFlatLinguist aflatLinguist) { this.this_0 = aflatLinguist; }