Esempio n. 1
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]);
 }
Esempio n. 2
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(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);
 }