Class IntersectingAnnotationBooleanCountC

  • All Implemented Interfaces:
    edu.upf.taln.ml.feat.base.FeatCalculator<Double,​gate.Annotation,​DocumentCtx>

    public class IntersectingAnnotationBooleanCountC
    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 if feature name is not null, with a given value for a boolean feature
    • Constructor Detail

      • IntersectingAnnotationBooleanCountC

        public IntersectingAnnotationBooleanCountC​(String tokenAnnotationSet,
                                                   String tokenAnnotationName,
                                                   String filterFeatureName,
                                                   boolean featureValue)
        The annotation set and the annotation name to check for intersection with the main annotation If feature name is not null or empty: - both feature name and the feature boolean value have to match to consider the annotation in the count
        Parameters:
        tokenAnnotationSet -
        tokenAnnotationName -
        filterFeatureName -
        filterFeatureValue -
    • Method Detail

      • calculateFeature

        public edu.upf.taln.ml.feat.base.MyDouble calculateFeature​(gate.Annotation obj,
                                                                   DocumentCtx doc,
                                                                   String featName)
        Specified by:
        calculateFeature in interface edu.upf.taln.ml.feat.base.FeatCalculator<Double,​gate.Annotation,​DocumentCtx>