示例#1
0
 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;
 }
示例#2
0
 public override float getInsertionProbability()
 {
     if (this.pronunciation.getWord().isFiller())
     {
         return(0f);
     }
     return(AFlatLinguist.access_1100(this.this_0));
 }
示例#3
0
        internal static long access_108(AFlatLinguist aflatLinguist)
        {
            long num    = aflatLinguist.counterForMemoryLogging;
            long result = num;

            aflatLinguist.counterForMemoryLogging = num + 1L;
            return(result);
        }
示例#4
0
            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);
            }
示例#5
0
            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);
            }
示例#6
0
            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));
            }
示例#7
0
 internal FullHMMSearchState(AFlatLinguist aflatLinguist, AFlatLinguist.PronunciationState pronunciationState, int num, int num2) : this(aflatLinguist, pronunciationState, num, num2, pronunciationState.getPronunciation().getUnits()[num + 1].getBaseID())
 {
 }
示例#8
0
 internal HMMStateSearchState(AFlatLinguist aflatLinguist, AFlatLinguist.FullHMMSearchState fullHMMSearchState, HMMState hmmstate) : this(aflatLinguist, fullHMMSearchState, hmmstate, 0f)
 {
 }
示例#9
0
 internal virtual int[] getNextUnits()
 {
     return((int[])AFlatLinguist.access_1000(this.this_0).get(this.node));
 }
示例#10
0
 internal static bool access_400(AFlatLinguist aflatLinguist)
 {
     return(aflatLinguist.addOutOfGrammarBranch);
 }
示例#11
0
 internal GrammarState(AFlatLinguist aflatLinguist, GrammarNode grammarNode, float num, int num2) : this(aflatLinguist, grammarNode, num, num2, 0)
 {
 }
示例#12
0
 internal static float access_1200(AFlatLinguist aflatLinguist)
 {
     return(aflatLinguist.logSilenceInsertionProbability);
 }
示例#13
0
 internal static Map access_1000(AFlatLinguist aflatLinguist)
 {
     return(aflatLinguist.nodeToNextUnitArrayMap);
 }
示例#14
0
 internal static Map access_900(AFlatLinguist aflatLinguist)
 {
     return(aflatLinguist.nodeToUnitSetMap);
 }
示例#15
0
 internal static HMMPool access_800(AFlatLinguist aflatLinguist)
 {
     return(aflatLinguist.hmmPool);
 }
示例#16
0
 internal static float access_700(AFlatLinguist aflatLinguist)
 {
     return(aflatLinguist.logPhoneInsertionProbability);
 }
示例#17
0
 internal static float access_600(AFlatLinguist aflatLinguist)
 {
     return(aflatLinguist.logOutOfGrammarBranchProbability);
 }
示例#18
0
 internal static AcousticModel access_500(AFlatLinguist aflatLinguist)
 {
     return(aflatLinguist.acousticModel);
 }
示例#19
0
 internal GrammarState(AFlatLinguist aflatLinguist, GrammarNode grammarNode) : this(aflatLinguist, grammarNode, 0f, UnitManager.__SILENCE.getBaseID())
 {
 }
示例#20
0
            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)));
            }
示例#21
0
 internal static float access_1300(AFlatLinguist aflatLinguist)
 {
     return(aflatLinguist.logFillerInsertionProbability);
 }
示例#22
0
 internal static SearchStateArc[] access_300(AFlatLinguist aflatLinguist)
 {
     return(aflatLinguist.EMPTY_ARCS);
 }
示例#23
0
 public override float getLanguageProbability()
 {
     return(this.languageProbability * AFlatLinguist.access_000(this.this_0));
 }
示例#24
0
 internal static float access_1400(AFlatLinguist aflatLinguist)
 {
     return(aflatLinguist.logUnitInsertionProbability);
 }
示例#25
0
 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());
 }
示例#26
0
 internal DynamicFlatSearchGraph(AFlatLinguist aflatLinguist)
 {
     this.this_0 = aflatLinguist;
 }
示例#27
0
 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());
 }
示例#28
0
 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);
 }
示例#29
0
 internal HMMStateSearchState(AFlatLinguist aflatLinguist, AFlatLinguist.FullHMMSearchState fullHMMSearchState, HMMState hmmstate, float num) : base(aflatLinguist)
 {
     this.probability        = num;
     this.fullHMMSearchState = fullHMMSearchState;
     this.hmmState           = hmmstate;
 }
示例#30
0
 internal FlatSearchState(AFlatLinguist aflatLinguist)
 {
     this.this_0 = aflatLinguist;
 }