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

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