// create it
File directory = new File("./temp");
if(directory.exists() == false){
new File("./temp").mkdir();
}
Learner creator = Learner.getLearner("./temp",Learner.LibSVMModelCreator,true);
creator.setParameters(parameters);
creator.setMethod(Parameters.WeightingMethod.BOOLEAN);
RAMTrainingCorpus subjectiveCorpus = getCorpus(fileSubj,"subjective",creator);
RAMTrainingCorpus objectiveCorpus = getCorpus(fileObj,"objective",creator);
subjectiveCorpus.addAll(objectiveCorpus);
// filter some of the attributes out based on their LLR score
creator.keepTopNAttributesLLR(2000);
// prune terms
// creator.pruneTermsDocFreq(2,subjectiveCorpus.size());
long l0 = System.currentTimeMillis();
creator.learn(subjectiveCorpus);
long l1 = System.currentTimeMillis();
System.err.println("learning done in "+(l1-l0));
}