use of edu.illinois.cs.cogcomp.edison.features.factory.CorelexFeatureExtractor in project cogcomp-nlp by CogComp.
the class TestCorlex method test.
public final void test() throws EdisonException {
log.debug("Corlex Feature Extractor");
// Using the first TA and a constituent between span of 30-40 as a test
TextAnnotation ta = tas.get(1);
View TOKENS = ta.getView("TOKENS");
log.debug("Got tokens FROM TextAnnotation");
CorelexFeatureExtractor testInstance = new CorelexFeatureExtractor(true);
Set<Feature> feats = testInstance.getWordFeatures(ta, 1);
String[] expected_outputs = { "atr" };
if (feats == null) {
log.debug("Feats are returning NULL.");
}
log.debug("Printing Set of Features");
for (Feature f : feats) {
log.debug(f.getName());
assertTrue(ArrayUtils.contains(expected_outputs, f.getName()));
}
}
Aggregations