use of org.dkpro.tc.features.pair.core.ne.SharedNEsFeatureExtractor in project dkpro-tc by dkpro.
the class SharedNEsFeatureExtractorTest method extractTest1.
@Test
public void extractTest1() throws Exception {
NamedEntity ne1 = new NamedEntity(jcas1, 0, 4);
ne1.addToIndexes();
SharedNEsFeatureExtractor extractor = new SharedNEsFeatureExtractor();
Set<Feature> features = extractor.extract(jcas1, jcas2);
assertEquals(1, features.size());
for (Feature feature : features) {
assertFeature("SharedNEs", false, feature);
}
NamedEntity ne2 = new NamedEntity(jcas2, 0, 4);
ne2.addToIndexes();
features = extractor.extract(jcas1, jcas2);
assertEquals(1, features.size());
for (Feature feature : features) {
assertFeature("SharedNEs", true, feature);
}
}
Aggregations