예제 #1
0
        private HypothesisUtterance nextUtterance()
        {
            string text = this.reader.readLine();

            if (text == null)
            {
                return(null);
            }
            this.utteranceCount++;
            HypothesisUtterance hypothesisUtterance = new HypothesisUtterance(text);

            if (hypothesisUtterance.getWordCount() <= 0)
            {
                return(this.nextUtterance());
            }
            return(hypothesisUtterance);
        }
예제 #2
0
 internal HypothesisWord nextWord()
 {
     if (this.iterator == null || !this.iterator.hasNext())
     {
         HypothesisUtterance hypothesisUtterance = this.nextUtterance();
         if (hypothesisUtterance != null)
         {
             this.iterator = hypothesisUtterance.getWords().iterator();
         }
         else
         {
             this.iterator = null;
         }
     }
     if (this.iterator == null)
     {
         return(null);
     }
     return((HypothesisWord)this.iterator.next());
 }