public void incrementCounts(double[][][] counts,List<TransitionState> fullViterbiStateSeq){
  for (int i=0; i < fullViterbiStateSeq.size(); ++i) {
    TransitionState currTs=fullViterbiStateSeq.get(i);
    TransitionStateType currType=currTs.getType();
    if (currType == TransitionStateType.TMPL) {
      int language=currTs.getLanguageIndex();
      if (language >= 0) {
        int lmChar=currTs.getLmCharIndex();
        int glyph=glyphIndex(currTs.getGlyphChar());
        counts[language][lmChar][glyph]+=1;
      }
    }
 else     if (currType == TransitionStateType.RMRGN_HPHN_INIT) {
      int language=currTs.getLanguageIndex();
      if (language >= 0) {
        GlyphChar currGlyphChar=currTs.getGlyphChar();
        if (currGlyphChar.templateCharIndex == spaceCharIndex) {
          int glyph=glyphIndex(currGlyphChar);
          counts[language][hyphenCharIndex][glyph]+=1;
        }
      }
    }
  }
}

public void incrementCounts ( double [ ] [ ] [ ] counts , List < TransitionState > fullViterbiStateSeq ) { for ( int i = 0 ; i < fullViterbiStateSeq . size ( ) ; ++ i ) { TransitionState currTs = fullViterbiStateSeq . get ( i ) ; TransitionStateType currType = currTs . getType ( ) ; if ( currType == TransitionStateType . TMPL ) { int language = currTs . getLanguageIndex ( ) ; if ( language >= 0 ) { int lmChar = currTs . getLmCharIndex ( ) ; int glyph = glyphIndex ( currTs . getGlyphChar ( ) ) ; counts [ language ] [ lmChar ] [ glyph ] += 1 ; } } else if ( currType == TransitionStateType . RMRGN_HPHN_INIT ) { int language = currTs . getLanguageIndex ( ) ; if ( language >= 0 ) { GlyphChar currGlyphChar = currTs . getGlyphChar ( ) ; if ( currGlyphChar . templateCharIndex == spaceCharIndex ) { int glyph = glyphIndex ( currGlyphChar ) ; counts [ language ] [ hyphenCharIndex ] [ glyph ] += 1 ; } } } } }
traverse the sequence of viterbi states , adding counts
