Class IntersectingAnnotationStringCountC
- java.lang.Object
-
- edu.upf.taln.dri.module.rhetclassifier.feats.generator.IntersectingAnnotationStringCountC
-
- All Implemented Interfaces:
edu.upf.taln.ml.feat.base.FeatCalculator<Double,gate.Annotation,DocumentCtx>
public class IntersectingAnnotationStringCountC extends Object implements edu.upf.taln.ml.feat.base.FeatCalculator<Double,gate.Annotation,DocumentCtx>
Get the number of intersecting annotations from a given annotation set, of a given type and eventyally evin a specific feature with a specific String value.
-
-
Constructor Summary
Constructors Constructor Description IntersectingAnnotationStringCountC(String tokenAnnotationSet, String tokenAnnotationName, String filterFeatureName, String filterFeatureValue, boolean startsWith, boolean percentage, boolean excludeCitSpan)
The annotation set and the annotation name to check for intersection with the main annotation If feature name is not null or empty: - if feature value is null, all annotatio with that feature name are considered in the count - if feature value is not null or empty, all annotation with that feature name and value are considered in the count - if feature value is empty, all the annotation having a feature with that name are considered in the count
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description edu.upf.taln.ml.feat.base.MyDouble
calculateFeature(gate.Annotation obj, DocumentCtx doc, String featName)
static double
round(double value, int places)
-
-
-
Constructor Detail
-
IntersectingAnnotationStringCountC
public IntersectingAnnotationStringCountC(String tokenAnnotationSet, String tokenAnnotationName, String filterFeatureName, String filterFeatureValue, boolean startsWith, boolean percentage, boolean excludeCitSpan)
The annotation set and the annotation name to check for intersection with the main annotation If feature name is not null or empty: - if feature value is null, all annotatio with that feature name are considered in the count - if feature value is not null or empty, all annotation with that feature name and value are considered in the count - if feature value is empty, all the annotation having a feature with that name are considered in the count- Parameters:
tokenAnnotationSet
-tokenAnnotationName
-filterFeatureName
-filterFeatureValue
-excludeCitSpan
-
-
-
Method Detail
-
calculateFeature
public edu.upf.taln.ml.feat.base.MyDouble calculateFeature(gate.Annotation obj, DocumentCtx doc, String featName)
- Specified by:
calculateFeature
in interfaceedu.upf.taln.ml.feat.base.FeatCalculator<Double,gate.Annotation,DocumentCtx>
-
round
public static double round(double value, int places)
-
-