public void finishTerm() throws IOException {
  int numArcs=0;
  int numDedupBytes=1;
  analyzed.grow(analyzed.length() + 1);
  analyzed.setLength(analyzed.length() + 1);
  for (  Entry entry : entries) {
    if (numArcs == maxNumArcsForDedupByte(numDedupBytes)) {
      analyzed.setByteAt(analyzed.length() - 1,(byte)(numArcs));
      analyzed.grow(analyzed.length() + 1);
      analyzed.setLength(analyzed.length() + 1);
      numArcs=0;
      numDedupBytes++;
    }
    analyzed.setByteAt(analyzed.length() - 1,(byte)numArcs++);
    Util.toIntsRef(analyzed.get(),scratchInts);
    builder.add(scratchInts.get(),outputs.newPair(entry.weight,entry.payload));
  }
  maxAnalyzedPathsPerOutput=Math.max(maxAnalyzedPathsPerOutput,entries.size());
  entries.clear();
}

public void finishTerm ( ) throws IOException { int numArcs = 0 ; int numDedupBytes = 1 ; analyzed . grow ( analyzed . length ( ) + 1 ) ; analyzed . setLength ( analyzed . length ( ) + 1 ) ; for ( Entry entry : entries ) { if ( numArcs == maxNumArcsForDedupByte ( numDedupBytes ) ) { analyzed . setByteAt ( analyzed . length ( ) - 1 , ( byte ) ( numArcs ) ) ; analyzed . grow ( analyzed . length ( ) + 1 ) ; analyzed . setLength ( analyzed . length ( ) + 1 ) ; numArcs = 0 ; numDedupBytes ++ ; } analyzed . setByteAt ( analyzed . length ( ) - 1 , ( byte ) numArcs ++ ) ; Util . toIntsRef ( analyzed . get ( ) , scratchInts ) ; builder . add ( scratchInts . get ( ) , outputs . newPair ( entry . weight , entry . payload ) ) ; } maxAnalyzedPathsPerOutput = Math . max ( maxAnalyzedPathsPerOutput , entries . size ( ) ) ; entries . clear ( ) ; }
writes all the entries for the fst input term
