@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); } }
@Override public Set<Feature> extract(JCas view1, JCas view2) throws TextClassificationException { return new Feature("DiffTypeTokenRatio", getTypeTokenRatio(view1) / getTypeTokenRatio(view2), FeatureType.NUMERIC).asSet(); }
TypeTokenPairFeatureExtractor extends FeatureExtractorResource_ImplBase implements PairFeatureExtractor { @Override public Set<Feature> extract(JCas view1, JCas view2) throws TextClassificationException { return new Feature("DiffTypeTokenRatio", getTypeTokenRatio(view1) / getTypeTokenRatio(view2), FeatureType.NUMERIC).asSet(); } }
TypeTokenPairFeatureExtractor extends FeatureExtractorResource_ImplBase implements PairFeatureExtractor { @Override public Set<Feature> extract(JCas view1, JCas view2) throws TextClassificationException { return new Feature("DiffTypeTokenRatio", getTypeTokenRatio(view1) / getTypeTokenRatio(view2), FeatureType.NUMERIC).asSet(); }  }
TypeTokenPairFeatureExtractor extends FeatureExtractorResource_ImplBase implements PairFeatureExtractor { @Override public Set<Feature> extract(JCas view1, JCas view2) throws TextClassificationException { return new Feature("DiffTypeTokenRatio", getTypeTokenRatio(view1) / getTypeTokenRatio(view2), FeatureType.NUMERIC).asSet(); }  @Override Set<Feature> extract(JCas view1, JCas view2); }
TypeTokenPairFeatureExtractor extends FeatureExtractorResource_ImplBase implements PairFeatureExtractor { @Override public Set<Feature> extract(JCas view1, JCas view2) throws TextClassificationException { return new Feature("DiffTypeTokenRatio", getTypeTokenRatio(view1) / getTypeTokenRatio(view2), FeatureType.NUMERIC).asSet(); }  @Override Set<Feature> extract(JCas view1, JCas view2);  }