private void flushUnigram(){
  clearAttributes();
  char termBuffer[]=termAtt.resizeBuffer(2);
  int len=Character.toChars(buffer[index],termBuffer,0);
  termAtt.setLength(len);
  offsetAtt.setOffset(startOffset[index],endOffset[index]);
  typeAtt.setType(SINGLE_TYPE);
  index++;
}

private void flushUnigram ( ) { clearAttributes ( ) ; char termBuffer [ ] = termAtt . resizeBuffer ( 2 ) ; int len = Character . toChars ( buffer [ index ] , termBuffer , 0 ) ; termAtt . setLength ( len ) ; offsetAtt . setOffset ( startOffset [ index ] , endOffset [ index ] ) ; typeAtt . setType ( SINGLE_TYPE ) ; index ++ ; }
flushes a unigram token to output from our buffer . this happens when we encounter isolated cjk characters , either the whole cjk string is a single character , or we encounter a cjk character surrounded by space , punctuation , english , etc , but not beside any other cjk .
