Class IntersectingAnnotationTextC

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

    public class IntersectingAnnotationTextC
    extends Object
    implements edu.upf.taln.ml.feat.base.FeatCalculator<String,​gate.Annotation,​DocumentCtx>
    Get the text of intersecting annotations (separated by a space) from a given annotation set, of a given type and eventually in a specific feature with a specific String value.
    • Constructor Summary

      Constructors 
      Constructor Description
      IntersectingAnnotationTextC​(String tokenAnnotationSet, String tokenAnnotationName, String filterFeatureName, String filterFeatureValue, boolean startsWith, String addFeatureValue, boolean removeStopwords, 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 not null or empty, all annotation with that feature name and value are considered in the text output building - if feature value is empty, all the annotation having a feature with that name are considered in the count The text is composed of the main annotation text if the addFeatureValue argument is null or empty, if not it is composed of the value of the feature with name addFeatureValue.
    • Constructor Detail

      • IntersectingAnnotationTextC

        public IntersectingAnnotationTextC​(String tokenAnnotationSet,
                                           String tokenAnnotationName,
                                           String filterFeatureName,
                                           String filterFeatureValue,
                                           boolean startsWith,
                                           String addFeatureValue,
                                           boolean removeStopwords,
                                           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 not null or empty, all annotation with that feature name and value are considered in the text output building - if feature value is empty, all the annotation having a feature with that name are considered in the count The text is composed of the main annotation text if the addFeatureValue argument is null or empty, if not it is composed of the value of the feature with name addFeatureValue. If excludeCitSpan is true, the token included in an inline citation span are not considered.
        Parameters:
        tokenAnnotationSet -
        tokenAnnotationName -
        filterFeatureName -
        filterFeatureValue -
        startsWith -
        addFeatureValue -
        excludeCitSpan -
    • Method Detail

      • calculateFeature

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