@Override
public FeatureSpecification generateFeatures(ExampleSet basicExamples) {
ExampleSet examples = basicExamples.copy();
FeatureSpecification spec = new FeatureSpecification();
System.out.print("Configuring features over " + examples.size() + " examples... ");
try {
spec.addFilter(getPronounsFilter(examples));
spec.addFilter(getPunctuationFilter(examples));
spec.addFilter(getSpecialWordsFilter(examples));
spec.addFilter(getSpellingFilter(examples));
spec.addFilter(getEmoticonsFilter(examples));
spec.addFilter(getBagOfWordsFilter(examples));
if (this.getParticipantFeatureCount() > 0) {
spec.addFilter(getParticipantsFilter(examples));
} else {
spec.addFilter(getRemoveParticipantFilter(examples));
}
spec.addFilter(getRemoveIDFilter(examples));
//spec.addFilter(getSparseToNonsparseFilter(examples));
//spec.addFilter(getFeatureSelectionFilter(examples));
Instances output = spec.getOutputFormat();
int numAttrs = output.numAttributes();
System.out.println("generated " + (numAttrs - 1) + " features.");
} catch (Exception e) {
System.err.println("Error generating features.");
System.err.println("\t" + e.getMessage());