TermDocumentMatrix tdm = corpus;
if (ignoreCase) tdm = tdm.toLowerCase();
if (rejectRareTerms) tdm = tdm.rejectHapaxes();
if (rejectStopwords) tdm = tdm.rejectStopwords();
// TODO if (rejectCommonTerms) tdm = tdm.rejectCommonTerms();
return tdm.weight(local, global);
}
public CorpusBuilder rejectCommonTerms() {
rejectCommonTerms = true;