public void writeResults(PrintStream out){
  logger.info(String.format("Writing final class assignments in %s format",outputFormat.toString()));
  Collections.sort(effectiveVocabulary,new WordClassComparator(wordToClass));
  for (  IString word : effectiveVocabulary) {
    int assignment=wordToClass.get(word);
    if (outputFormat == OutputFormat.TSV) {
      out.printf("%s\t%d%n",word.toString(),assignment);
    }
 else     if (outputFormat == OutputFormat.SRILM) {
      out.printf("%d 1.0 %s%n",assignment,word.toString());
    }
  }
}

public void writeResults ( PrintStream out ) { logger . info ( String . format ( "Writing final class assignments in %s format" , outputFormat . toString ( ) ) ) ; Collections . sort ( effectiveVocabulary , new WordClassComparator ( wordToClass ) ) ; for ( IString word : effectiveVocabulary ) { int assignment = wordToClass . get ( word ) ; if ( outputFormat == OutputFormat . TSV ) { out . printf ( "%s\t%d%n" , word . toString ( ) , assignment ) ; } else if ( outputFormat == OutputFormat . SRILM ) { out . printf ( "%d 1.0 %s%n" , assignment , word . toString ( ) ) ; } } }
write the final cluster assignments to the specified output stream .
