private void writeObject(ObjectOutputStream out) throws IOException {
   out.writeInt(CURRENT_SERIAL_VERSION);
   out.writeObject(ilist);
   out.writeInt(numTopics);
   out.writeDouble(alpha);
   out.writeDouble(beta);
   out.writeDouble(gamma);
   out.writeDouble(delta);
   out.writeDouble(tAlpha);
   out.writeDouble(vBeta);
   out.writeDouble(vGamma);
   out.writeInt(numTypes);
   out.writeInt(numBitypes);
   out.writeInt(numTokens);
   out.writeInt(biTokens);
   for (int di = 0; di < topics.length; di++)
     for (int si = 0; si < topics[di].length; si++) out.writeInt(topics[di][si]);
   for (int di = 0; di < topics.length; di++)
     for (int si = 0; si < topics[di].length; si++) out.writeInt(grams[di][si]);
   writeIntArray2(docTopicCounts, out);
   for (int fi = 0; fi < numTypes; fi++)
     for (int n = 0; n < 2; n++)
       for (int ti = 0; ti < numTopics; ti++) out.writeInt(typeNgramTopicCounts[fi][n][ti]);
   writeIntArray2(unitypeTopicCounts, out);
   writeIntArray2(bitypeTopicCounts, out);
   for (int ti = 0; ti < numTopics; ti++) out.writeInt(tokensPerTopic[ti]);
   writeIntArray2(bitokensPerTopic, out);
 }
Beispiel #2
0
 private void writeObject(ObjectOutputStream out) throws IOException {
   out.writeInt(CURRENT_SERIAL_VERSION);
   out.writeObject(prefix);
   out.writeInt(gramSizes.length);
   for (int i = 0; i < gramSizes.length; i++) out.writeInt(gramSizes[i]);
   out.writeBoolean(distinguishBorders);
 }
Beispiel #3
0
 private void writeObject(ObjectOutputStream out) throws IOException {
   out.writeInt(CURRENT_SERIAL_VERSION);
   out.writeObject(ilist);
   out.writeInt(numTopics);
   out.writeDouble(alpha);
   out.writeDouble(beta);
   out.writeDouble(tAlpha);
   out.writeDouble(vBeta);
   for (int di = 0; di < topics.length; di++)
     for (int si = 0; si < topics[di].length; si++) out.writeInt(topics[di][si]);
   for (int di = 0; di < topics.length; di++)
     for (int ti = 0; ti < numTopics; ti++) out.writeInt(docTopicCounts[di][ti]);
   for (int fi = 0; fi < numTypes; fi++)
     for (int ti = 0; ti < numTopics; ti++) out.writeInt(typeTopicCounts[fi][ti]);
   for (int ti = 0; ti < numTopics; ti++) out.writeInt(tokensPerTopic[ti]);
 }
 private void writeObject(ObjectOutputStream out) throws IOException {
   out.writeInt(CURRENT_SERIAL_VERSION);
   out.writeObject(prefix);
 }
 private void writeIntArray2(int[][] a, ObjectOutputStream out) throws IOException {
   out.writeInt(a.length);
   int d2 = a[0].length;
   out.writeInt(d2);
   for (int i = 0; i < a.length; i++) for (int j = 0; j < d2; j++) out.writeInt(a[i][j]);
 }