Class SectionNumberC

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

    public class SectionNumberC
    extends Object
    implements edu.upf.taln.ml.feat.base.FeatCalculator<Double,​gate.Annotation,​DocumentCtx>
    Get a Double from 0 to 100 that reflects the position of the annotation (central offset ID) with respect to the section the sentence belongs to. A section is the set of sentences between two consecutive main headers (h1).
    • Constructor Detail

      • SectionNumberC

        public SectionNumberC​(boolean considerOnlyTopLevelHeaders)
        If considerOnlyTopLevelHeaders is true, only h1 headers are considered in the section number count
        Parameters:
        considerOnlyTopLevelHeaders -
    • 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>
      • main

        public static void main​(String[] args)