use of edu.illinois.cs.cogcomp.edison.features.WordFeatureExtractor in project cogcomp-nlp by CogComp.
the class TestWordFeatureFactory method testBrownFeatures.
@Test
public final void testBrownFeatures() throws EdisonException {
logger.info("\tTesting Brown cluster features");
WordFeatureExtractor brownFeatureGenerator = WordFeatureExtractorFactory.getBrownFeatureGenerator("", "brownBllipClusters", new int[] { 4, 5 });
for (TextAnnotation ta : tas) {
runTest(ta, brownFeatureGenerator);
}
}
use of edu.illinois.cs.cogcomp.edison.features.WordFeatureExtractor in project cogcomp-nlp by CogComp.
the class CreateTestFeaturesResource method addBrownFeatures.
private void addBrownFeatures() throws EdisonException {
logger.info("\tadding Brown cluster features");
WordFeatureExtractor brownFeatureGenerator = WordFeatureExtractorFactory.getBrownFeatureGenerator("", "brownBllipClusters", new int[] { 4, 5 });
for (TextAnnotation ta : tas) {
addFeatures(ta, brownFeatureGenerator);
}
}
use of edu.illinois.cs.cogcomp.edison.features.WordFeatureExtractor in project cogcomp-nlp by CogComp.
the class CreateTestFeaturesResource method addGazetteerFeatures.
private void addGazetteerFeatures() throws Exception {
logger.info("\tadding gazetteer features");
WordFeatureExtractor fex = WordFeatureExtractorFactory.getGazetteerFeatureExtractor("gazetteer", new SimpleGazetteerAnnotator());
for (TextAnnotation ta : tas) {
addFeatures(ta, fex);
}
}
Aggregations