Search in sources :

Example 1 with WordFeatureExtractor

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);
    }
}
Also used : WordFeatureExtractor(edu.illinois.cs.cogcomp.edison.features.WordFeatureExtractor) TextAnnotation(edu.illinois.cs.cogcomp.core.datastructures.textannotation.TextAnnotation) Test(org.junit.Test)

Example 2 with WordFeatureExtractor

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

Example 3 with WordFeatureExtractor

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);
    }
}
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)3 WordFeatureExtractor (edu.illinois.cs.cogcomp.edison.features.WordFeatureExtractor)3 SimpleGazetteerAnnotator (edu.illinois.cs.cogcomp.edison.annotators.SimpleGazetteerAnnotator)1 Test (org.junit.Test)1