Search in sources :

Example 1 with AlwaysZeroPairFeatureExtractor

use of org.dkpro.tc.features.pair.core.AlwaysZeroPairFeatureExtractor in project dkpro-tc by dkpro.

the class BaselinePairFeatureTest method extractTest.

@Test
public void extractTest() throws Exception {
    AnalysisEngineDescription desc = createEngineDescription(BreakIteratorSegmenter.class);
    AnalysisEngine engine = createEngine(desc);
    PairFeatureExtractor extractor = new AlwaysZeroPairFeatureExtractor();
    Set<Feature> features = runExtractor(engine, extractor);
    assertEquals(1, features.size());
    for (Feature feature : features) {
        assertFeature("BaselineFeature", 0, feature);
    }
}
Also used : AlwaysZeroPairFeatureExtractor(org.dkpro.tc.features.pair.core.AlwaysZeroPairFeatureExtractor) PairFeatureExtractor(org.dkpro.tc.api.features.PairFeatureExtractor) AnalysisEngineDescription(org.apache.uima.analysis_engine.AnalysisEngineDescription) FeatureTestUtil.assertFeature(org.dkpro.tc.testing.FeatureTestUtil.assertFeature) Feature(org.dkpro.tc.api.features.Feature) AnalysisEngine(org.apache.uima.analysis_engine.AnalysisEngine) AlwaysZeroPairFeatureExtractor(org.dkpro.tc.features.pair.core.AlwaysZeroPairFeatureExtractor) Test(org.junit.Test)

Aggregations

AnalysisEngine (org.apache.uima.analysis_engine.AnalysisEngine)1 AnalysisEngineDescription (org.apache.uima.analysis_engine.AnalysisEngineDescription)1 Feature (org.dkpro.tc.api.features.Feature)1 PairFeatureExtractor (org.dkpro.tc.api.features.PairFeatureExtractor)1 AlwaysZeroPairFeatureExtractor (org.dkpro.tc.features.pair.core.AlwaysZeroPairFeatureExtractor)1 FeatureTestUtil.assertFeature (org.dkpro.tc.testing.FeatureTestUtil.assertFeature)1 Test (org.junit.Test)1