Example #1
0
 // Helpers
 // -----------------------------------------------------------------------------------------------------------------------------------------------------------
 private static void createLdaSamples(
     String sampleName, int size, int topics, boolean tagrec, boolean personalizedTopicCreation) {
   getTrainTestSize(sampleName);
   for (int i = 1; i <= size; i++) {
     MalletCalculator.createSample(
         sampleName, (short) topics, tagrec, TRAIN_SIZE, personalizedTopicCreation);
   }
 }
Example #2
0
 private static void startLdaCalculator(
     String sampleDir, String sampleName, int topics, int sampleCount, boolean all) {
   getTrainTestSize(sampleName);
   BookmarkReader reader = null;
   for (int i = 1; i <= sampleCount; i++) {
     reader = MalletCalculator.predictSample(sampleName, TRAIN_SIZE, TEST_SIZE, topics, true, all);
   }
   writeMetrics(sampleDir, sampleName, "lda_" + topics, sampleCount, 10, null, reader, null);
 }