Пример #1
0
 internal GrammarState(DynamicFlatLinguist dynamicFlatLinguist, GrammarNode grammarNode, float num, int num2, int num3) : base(dynamicFlatLinguist)
 {
     this.lc                  = num2;
     this.nextBaseID          = num3;
     this.node                = grammarNode;
     this.languageProbability = num;
 }
Пример #2
0
 public override SearchStateArc[] getSuccessors()
 {
     SearchStateArc[] array = this.getCachedSuccessors();
     if (array != null)
     {
         return(array);
     }
     if (this.isFinal())
     {
         array = DynamicFlatLinguist.access_100(this.this_0);
     }
     else if (this.node.isEmpty())
     {
         array = this.getNextGrammarStates(this.lc, this.nextBaseID);
     }
     else
     {
         Word             word           = this.node.getWord();
         Pronunciation[]  pronunciations = word.getPronunciations();
         SearchStateArc[] array2         = new SearchStateArc[pronunciations.Length];
         for (int i = 0; i < pronunciations.Length; i++)
         {
             array2[i] = new DynamicFlatLinguist.PronunciationState(this.this_0, this, pronunciations[i]);
         }
         array = array2;
     }
     this.cacheSuccessors(array);
     return(array);
 }
Пример #3
0
 public override float getInsertionProbability()
 {
     if (this.pronunciation.getWord().isFiller())
     {
         return(0f);
     }
     return(DynamicFlatLinguist.access_500(this.this_0));
 }
Пример #4
0
 public SearchState getInitialState()
 {
     DynamicFlatLinguist.InitialState initialState = new DynamicFlatLinguist.InitialState(this.this_0);
     initialState.addArc(new DynamicFlatLinguist.GrammarState(this.this_0, DynamicFlatLinguist.access_900(this.this_0).getInitialNode()));
     if (DynamicFlatLinguist.access_1000(this.this_0))
     {
         OutOfGrammarGraph outOfGrammarGraph = new OutOfGrammarGraph(DynamicFlatLinguist.access_1100(this.this_0), DynamicFlatLinguist.access_1200(this.this_0), DynamicFlatLinguist.access_1300(this.this_0));
         initialState.addArc(outOfGrammarGraph.getOutOfGrammarGraph());
     }
     return(initialState);
 }
Пример #5
0
            internal FullHMMSearchState(DynamicFlatLinguist dynamicFlatLinguist, DynamicFlatLinguist.PronunciationState pronunciationState, int num, int leftID, int rightID) : base(dynamicFlatLinguist)
            {
                this.pState = pronunciationState;
                this.index  = num;
                this.lc     = leftID;
                this.rc     = rightID;
                int baseID = pronunciationState.getPronunciation().getUnits()[num].getBaseID();
                int unitID = DynamicFlatLinguist.access_200(dynamicFlatLinguist).buildID(baseID, leftID, rightID);

                this.hmm = DynamicFlatLinguist.access_200(dynamicFlatLinguist).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(DynamicFlatLinguist.access_600(this.this_0));
                }
                if (baseUnit.isFiller())
                {
                    return(DynamicFlatLinguist.access_700(this.this_0));
                }
                return(DynamicFlatLinguist.access_800(this.this_0));
            }
Пример #7
0
 internal GrammarState(DynamicFlatLinguist dynamicFlatLinguist, GrammarNode grammarNode, float num, int num2) : this(dynamicFlatLinguist, grammarNode, num, num2, 0)
 {
 }
Пример #8
0
 internal GrammarState(DynamicFlatLinguist dynamicFlatLinguist, GrammarNode grammarNode) : this(dynamicFlatLinguist, grammarNode, 0f, UnitManager.__SILENCE.getBaseID())
 {
 }
Пример #9
0
 internal static AcousticModel access_1100(DynamicFlatLinguist dynamicFlatLinguist)
 {
     return(dynamicFlatLinguist.phoneLoopAcousticModel);
 }
Пример #10
0
 internal HMMStateSearchState(DynamicFlatLinguist dynamicFlatLinguist, DynamicFlatLinguist.FullHMMSearchState fullHMMSearchState, HMMState hmmstate, float num) : base(dynamicFlatLinguist)
 {
     this.probability        = num;
     this.fullHMMSearchState = fullHMMSearchState;
     this.hmmState           = hmmstate;
 }
Пример #11
0
 public override string toString()
 {
     return(new StringBuilder().append(this.node).append("[").append(DynamicFlatLinguist.access_200(this.this_0).getUnit(this.lc)).append(',').append(DynamicFlatLinguist.access_200(this.this_0).getUnit(this.nextBaseID)).append(']').toString());
 }
Пример #12
0
 public override string getSignature()
 {
     return(new StringBuilder().append("GS ").append(this.node).append("-lc-").append(DynamicFlatLinguist.access_200(this.this_0).getUnit(this.lc)).append("-rc-").append(DynamicFlatLinguist.access_200(this.this_0).getUnit(this.nextBaseID)).toString());
 }
Пример #13
0
 public override float getLanguageProbability()
 {
     return(this.languageProbability * DynamicFlatLinguist.access_000(this.this_0));
 }
Пример #14
0
 internal DynamicFlatSearchGraph(DynamicFlatLinguist dynamicFlatLinguist)
 {
     this.this_0 = dynamicFlatLinguist;
 }
Пример #15
0
 internal static float access_1300(DynamicFlatLinguist dynamicFlatLinguist)
 {
     return(dynamicFlatLinguist.logPhoneInsertionProbability);
 }
Пример #16
0
 internal static float access_1200(DynamicFlatLinguist dynamicFlatLinguist)
 {
     return(dynamicFlatLinguist.logOutOfGrammarBranchProbability);
 }
Пример #17
0
 internal static float access_700(DynamicFlatLinguist dynamicFlatLinguist)
 {
     return(dynamicFlatLinguist.logFillerInsertionProbability);
 }
Пример #18
0
 internal static Map access_400(DynamicFlatLinguist dynamicFlatLinguist)
 {
     return(dynamicFlatLinguist.nodeToNextUnitArrayMap);
 }
Пример #19
0
 internal static Map access_300(DynamicFlatLinguist dynamicFlatLinguist)
 {
     return(dynamicFlatLinguist.nodeToUnitSetMap);
 }
Пример #20
0
 internal static float access_000(DynamicFlatLinguist dynamicFlatLinguist)
 {
     return(dynamicFlatLinguist.languageWeight);
 }
Пример #21
0
            private bool hasEntryContext(GrammarNode grammarNode, int unitID)
            {
                Set set = (Set)DynamicFlatLinguist.access_300(this.this_0).get(grammarNode);

                return(set.contains(DynamicFlatLinguist.access_200(this.this_0).getUnit(unitID)));
            }
Пример #22
0
 internal static SearchStateArc[] access_100(DynamicFlatLinguist dynamicFlatLinguist)
 {
     return(dynamicFlatLinguist.EMPTY_ARCS);
 }
Пример #23
0
 internal static bool access_1000(DynamicFlatLinguist dynamicFlatLinguist)
 {
     return(dynamicFlatLinguist.addOutOfGrammarBranch);
 }
Пример #24
0
 internal FlatSearchState(DynamicFlatLinguist dynamicFlatLinguist)
 {
     this.this_0 = dynamicFlatLinguist;
 }
Пример #25
0
 internal int[] getNextUnits()
 {
     return((int[])DynamicFlatLinguist.access_400(this.this_0).get(this.node));
 }
Пример #26
0
 internal static Grammar access_900(DynamicFlatLinguist dynamicFlatLinguist)
 {
     return(dynamicFlatLinguist.grammar);
 }
Пример #27
0
 internal HMMStateSearchState(DynamicFlatLinguist dynamicFlatLinguist, DynamicFlatLinguist.FullHMMSearchState fullHMMSearchState, HMMState hmmstate) : this(dynamicFlatLinguist, fullHMMSearchState, hmmstate, 0f)
 {
 }
Пример #28
0
 internal FullHMMSearchState(DynamicFlatLinguist dynamicFlatLinguist, DynamicFlatLinguist.PronunciationState pronunciationState, int num, int num2) : this(dynamicFlatLinguist, pronunciationState, num, num2, pronunciationState.getPronunciation().getUnits()[num + 1].getBaseID())
 {
 }
Пример #29
0
 internal InitialState(DynamicFlatLinguist dynamicFlatLinguist) : base(dynamicFlatLinguist)
 {
     this.nextArcs = new ArrayList();
 }
Пример #30
0
 internal static HMMPool access_200(DynamicFlatLinguist dynamicFlatLinguist)
 {
     return(dynamicFlatLinguist.hmmPool);
 }