Search in sources :

Example 1 with FeatureTestUtil.assertFeature

use of org.dkpro.tc.testing.FeatureTestUtil.assertFeature in project dkpro-tc by dkpro.

the class DiffNounChunkCharacterLengthTest method extractTest1.

@Test
public void extractTest1() throws Exception {
    Chunk chunk1 = new Chunk(jcas1, 0, 4);
    chunk1.addToIndexes();
    Chunk chunk2 = new Chunk(jcas2, 0, 4);
    chunk2.addToIndexes();
    DiffNounChunkCharacterLength extractor = new DiffNounChunkCharacterLength();
    Set<Feature> features = extractor.extract(jcas1, jcas2);
    assertEquals(1, features.size());
    for (Feature feature : features) {
        FeatureTestUtil.assertFeature("DiffNounPhraseCharacterLength", 0.0, feature, 0.0001);
    }
}
Also used : DiffNounChunkCharacterLength(org.dkpro.tc.features.pair.core.chunk.DiffNounChunkCharacterLength) Chunk(de.tudarmstadt.ukp.dkpro.core.api.syntax.type.chunk.Chunk) FeatureTestUtil.assertFeature(org.dkpro.tc.testing.FeatureTestUtil.assertFeature) Feature(org.dkpro.tc.api.features.Feature) Test(org.junit.Test)

Aggregations

Chunk (de.tudarmstadt.ukp.dkpro.core.api.syntax.type.chunk.Chunk)1 Feature (org.dkpro.tc.api.features.Feature)1 DiffNounChunkCharacterLength (org.dkpro.tc.features.pair.core.chunk.DiffNounChunkCharacterLength)1 FeatureTestUtil.assertFeature (org.dkpro.tc.testing.FeatureTestUtil.assertFeature)1 Test (org.junit.Test)1