示例#1
0
 private Set getStartingContexts()
 {
     if (this.startingContexts == null)
     {
         this.startingContexts = new HashSet();
         if (this.node.isEmpty())
         {
             GrammarArc[] successors = this.getSuccessors();
             GrammarArc[] array      = successors;
             int          num        = array.Length;
             for (int i = 0; i < num; i++)
             {
                 GrammarArc          grammarArc = array[i];
                 FlatLinguist.GState gstate     = this.this_0.getGState(grammarArc.getGrammarNode());
                 this.startingContexts.addAll(gstate.getStartingContexts());
             }
         }
         else
         {
             Word            word           = this.node.getWord();
             Pronunciation[] pronunciations = word.getPronunciations();
             Pronunciation[] array2         = pronunciations;
             int             i = array2.Length;
             for (int j = 0; j < i; j++)
             {
                 Pronunciation pronunciation   = array2[j];
                 UnitContext   startingContext = this.getStartingContext(pronunciation);
                 this.startingContexts.add(startingContext);
             }
         }
     }
     return(this.startingContexts);
 }
示例#2
0
            private void pullRightContexts()
            {
                GrammarArc[] successors = this.getSuccessors();
                GrammarArc[] array      = successors;
                int          num        = array.Length;

                for (int i = 0; i < num; i++)
                {
                    GrammarArc          grammarArc = array[i];
                    FlatLinguist.GState gstate     = this.this_0.getGState(grammarArc.getGrammarNode());
                    this.rightContexts.addAll(gstate.getStartingContexts());
                }
            }