Search in sources :

Example 1 with TypeTokenPairFeatureExtractor

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

the class TypeTokenPairFeatureExtractorTest method testExtract.

@Test
public void testExtract() throws TextClassificationException {
    TypeTokenPairFeatureExtractor extractor = new TypeTokenPairFeatureExtractor();
    Set<Feature> features = extractor.extract(jcas1, jcas2);
    assertEquals(1, features.size());
    for (Feature feature : features) {
        assertFeature("DiffTypeTokenRatio", 1.33, feature, 0.1);
    }
}
Also used : TypeTokenPairFeatureExtractor(org.dkpro.tc.features.pair.core.style.TypeTokenPairFeatureExtractor) FeatureTestUtil.assertFeature(org.dkpro.tc.testing.FeatureTestUtil.assertFeature) Feature(org.dkpro.tc.api.features.Feature) Test(org.junit.Test)

Aggregations

Feature (org.dkpro.tc.api.features.Feature)1 TypeTokenPairFeatureExtractor (org.dkpro.tc.features.pair.core.style.TypeTokenPairFeatureExtractor)1 FeatureTestUtil.assertFeature (org.dkpro.tc.testing.FeatureTestUtil.assertFeature)1 Test (org.junit.Test)1