Ejemplo n.º 1
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);
            }
Ejemplo n.º 2
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);
            }
Ejemplo n.º 3
0
 public override bool equals(object obj)
 {
     if (obj == this)
     {
         return(true);
     }
     if (obj is AFlatLinguist.PronunciationState)
     {
         AFlatLinguist.PronunciationState pronunciationState = (AFlatLinguist.PronunciationState)obj;
         return(pronunciationState.gs.equals(this.gs) && Object.instancehelper_equals(pronunciationState.pronunciation, this.pronunciation));
     }
     return(false);
 }
Ejemplo n.º 4
0
 internal FullHMMSearchState(AFlatLinguist aflatLinguist, AFlatLinguist.PronunciationState pronunciationState, int num, int num2) : this(aflatLinguist, pronunciationState, num, num2, pronunciationState.getPronunciation().getUnits()[num + 1].getBaseID())
 {
 }