public void writeExternal(ObjectOutput out) throws IOException {
  out.writeInt(Vocabulary.size());
  for (int i=0; i < Vocabulary.size(); i++) {
    out.writeUTF(Vocabulary.word(i));
  }
  out.writeDouble(numTokens);
  out.writeInt(countFuncs.length);
  for (  long[] countFunc : countFuncs) {
    out.writeLong(countFunc[0]);
    out.writeLong(countFunc[1]);
  }
  out.writeInt(typesFuncs.length);
  for (  long[] typesFunc : typesFuncs) {
    out.writeLong(typesFunc[0]);
    out.writeLong(typesFunc[1]);
  }
  out.writeDouble(quantizationBase);
  bf.writeExternal(out);
}

public void writeExternal ( ObjectOutput out ) throws IOException { out . writeInt ( Vocabulary . size ( ) ) ; for ( int i = 0 ; i < Vocabulary . size ( ) ; i ++ ) { out . writeUTF ( Vocabulary . word ( i ) ) ; } out . writeDouble ( numTokens ) ; out . writeInt ( countFuncs . length ) ; for ( long [ ] countFunc : countFuncs ) { out . writeLong ( countFunc [ 0 ] ) ; out . writeLong ( countFunc [ 1 ] ) ; } out . writeInt ( typesFuncs . length ) ; for ( long [ ] typesFunc : typesFuncs ) { out . writeLong ( typesFunc [ 0 ] ) ; out . writeLong ( typesFunc [ 1 ] ) ; } out . writeDouble ( quantizationBase ) ; bf . writeExternal ( out ) ; }
write a bloom filter lm to some external location .
