Beispiel #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;
 }
Beispiel #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);
 }
Beispiel #3
0
 public override float getInsertionProbability()
 {
     if (this.pronunciation.getWord().isFiller())
     {
         return(0f);
     }
     return(DynamicFlatLinguist.access_500(this.this_0));
 }
Beispiel #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);
 }
Beispiel #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);
            }
Beispiel #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));
            }
Beispiel #7
0
 internal GrammarState(DynamicFlatLinguist dynamicFlatLinguist, GrammarNode grammarNode, float num, int num2) : this(dynamicFlatLinguist, grammarNode, num, num2, 0)
 {
 }
Beispiel #8
0
 internal GrammarState(DynamicFlatLinguist dynamicFlatLinguist, GrammarNode grammarNode) : this(dynamicFlatLinguist, grammarNode, 0f, UnitManager.__SILENCE.getBaseID())
 {
 }
Beispiel #9
0
 internal static AcousticModel access_1100(DynamicFlatLinguist dynamicFlatLinguist)
 {
     return(dynamicFlatLinguist.phoneLoopAcousticModel);
 }
Beispiel #10
0
 internal HMMStateSearchState(DynamicFlatLinguist dynamicFlatLinguist, DynamicFlatLinguist.FullHMMSearchState fullHMMSearchState, HMMState hmmstate, float num) : base(dynamicFlatLinguist)
 {
     this.probability        = num;
     this.fullHMMSearchState = fullHMMSearchState;
     this.hmmState           = hmmstate;
 }
Beispiel #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());
 }
Beispiel #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());
 }
Beispiel #13
0
 public override float getLanguageProbability()
 {
     return(this.languageProbability * DynamicFlatLinguist.access_000(this.this_0));
 }
Beispiel #14
0
 internal DynamicFlatSearchGraph(DynamicFlatLinguist dynamicFlatLinguist)
 {
     this.this_0 = dynamicFlatLinguist;
 }
Beispiel #15
0
 internal static float access_1300(DynamicFlatLinguist dynamicFlatLinguist)
 {
     return(dynamicFlatLinguist.logPhoneInsertionProbability);
 }
Beispiel #16
0
 internal static float access_1200(DynamicFlatLinguist dynamicFlatLinguist)
 {
     return(dynamicFlatLinguist.logOutOfGrammarBranchProbability);
 }
Beispiel #17
0
 internal static float access_700(DynamicFlatLinguist dynamicFlatLinguist)
 {
     return(dynamicFlatLinguist.logFillerInsertionProbability);
 }
Beispiel #18
0
 internal static Map access_400(DynamicFlatLinguist dynamicFlatLinguist)
 {
     return(dynamicFlatLinguist.nodeToNextUnitArrayMap);
 }
Beispiel #19
0
 internal static Map access_300(DynamicFlatLinguist dynamicFlatLinguist)
 {
     return(dynamicFlatLinguist.nodeToUnitSetMap);
 }
Beispiel #20
0
 internal static float access_000(DynamicFlatLinguist dynamicFlatLinguist)
 {
     return(dynamicFlatLinguist.languageWeight);
 }
Beispiel #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)));
            }
Beispiel #22
0
 internal static SearchStateArc[] access_100(DynamicFlatLinguist dynamicFlatLinguist)
 {
     return(dynamicFlatLinguist.EMPTY_ARCS);
 }
Beispiel #23
0
 internal static bool access_1000(DynamicFlatLinguist dynamicFlatLinguist)
 {
     return(dynamicFlatLinguist.addOutOfGrammarBranch);
 }
Beispiel #24
0
 internal FlatSearchState(DynamicFlatLinguist dynamicFlatLinguist)
 {
     this.this_0 = dynamicFlatLinguist;
 }
Beispiel #25
0
 internal int[] getNextUnits()
 {
     return((int[])DynamicFlatLinguist.access_400(this.this_0).get(this.node));
 }
Beispiel #26
0
 internal static Grammar access_900(DynamicFlatLinguist dynamicFlatLinguist)
 {
     return(dynamicFlatLinguist.grammar);
 }
Beispiel #27
0
 internal HMMStateSearchState(DynamicFlatLinguist dynamicFlatLinguist, DynamicFlatLinguist.FullHMMSearchState fullHMMSearchState, HMMState hmmstate) : this(dynamicFlatLinguist, fullHMMSearchState, hmmstate, 0f)
 {
 }
Beispiel #28
0
 internal FullHMMSearchState(DynamicFlatLinguist dynamicFlatLinguist, DynamicFlatLinguist.PronunciationState pronunciationState, int num, int num2) : this(dynamicFlatLinguist, pronunciationState, num, num2, pronunciationState.getPronunciation().getUnits()[num + 1].getBaseID())
 {
 }
Beispiel #29
0
 internal InitialState(DynamicFlatLinguist dynamicFlatLinguist) : base(dynamicFlatLinguist)
 {
     this.nextArcs = new ArrayList();
 }
Beispiel #30
0
 internal static HMMPool access_200(DynamicFlatLinguist dynamicFlatLinguist)
 {
     return(dynamicFlatLinguist.hmmPool);
 }