Search in sources :

Example 1 with SimpleGazetteerAnnotator

use of edu.illinois.cs.cogcomp.edison.annotators.SimpleGazetteerAnnotator 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);
    }
}
Also used : WordFeatureExtractor(edu.illinois.cs.cogcomp.edison.features.WordFeatureExtractor) SimpleGazetteerAnnotator(edu.illinois.cs.cogcomp.edison.annotators.SimpleGazetteerAnnotator) TextAnnotation(edu.illinois.cs.cogcomp.core.datastructures.textannotation.TextAnnotation)

Aggregations

TextAnnotation (edu.illinois.cs.cogcomp.core.datastructures.textannotation.TextAnnotation)1 SimpleGazetteerAnnotator (edu.illinois.cs.cogcomp.edison.annotators.SimpleGazetteerAnnotator)1 WordFeatureExtractor (edu.illinois.cs.cogcomp.edison.features.WordFeatureExtractor)1