@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));
spec.addFilter(getRemoveIDFilter(examples));
if (this.getParticipantFeatureCount() > 0) {
spec.addFilter(getParticipantsFilter(examples));
} else {
spec.addFilter(getRemoveParticipantFilter(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());