Class QuantifiableEntityNormalizingAnnotator

  • All Implemented Interfaces:
    Annotator

    public class QuantifiableEntityNormalizingAnnotator
    extends Object
    implements Annotator
    This class provides a facility for normalizing content of numerical named entities (number, money, date, time) in the pipeline package world. It uses a lot of code with QuantifiableEntityNormalizer. New stuff should generally be added there so as to reduce code duplication.
    Author:
    Jenny Finkel, Christopher Manning (extended for RTE), Chris Cox (original version)
    • Constructor Detail

      • QuantifiableEntityNormalizingAnnotator

        public QuantifiableEntityNormalizingAnnotator()
      • QuantifiableEntityNormalizingAnnotator

        public QuantifiableEntityNormalizingAnnotator​(boolean verbose)
      • QuantifiableEntityNormalizingAnnotator

        public QuantifiableEntityNormalizingAnnotator​(String name,
                                                      Properties props)
      • QuantifiableEntityNormalizingAnnotator

        public QuantifiableEntityNormalizingAnnotator​(String backgroundSymbol,
                                                      boolean verbose)
        Do quantity entity normalization and collapse together multitoken quantity entities into a single token.
        Parameters:
        backgroundSymbol - NER background symbol
        verbose - Whether to write messages
      • QuantifiableEntityNormalizingAnnotator

        public QuantifiableEntityNormalizingAnnotator​(boolean verbose,
                                                      boolean collapse)
        Do quantity entity normalization and collapse together multitoken quantity entities into a single token.
        Parameters:
        verbose - Whether to write messages
        collapse - Whether to collapse multitoken quantity entities.
      • QuantifiableEntityNormalizingAnnotator

        public QuantifiableEntityNormalizingAnnotator​(String backgroundSymbol,
                                                      boolean verbose,
                                                      boolean collapse)
    • Method Detail

      • annotate

        public void annotate​(Annotation annotation)
        Description copied from interface: Annotator
        Given an Annotation, perform a task on this Annotation.
        Specified by:
        annotate in interface Annotator
      • requires

        public Set<Class<? extends CoreAnnotation>> requires()
        Description copied from interface: Annotator
        Returns the set of tasks which this annotator requires in order to perform. For example, the POS annotator will return "tokenize", "ssplit".
        Specified by:
        requires in interface Annotator
      • requirementsSatisfied

        public Set<Class<? extends CoreAnnotation>> requirementsSatisfied()
        Description copied from interface: Annotator
        Returns a set of requirements for which tasks this annotator can provide. For example, the POS annotator will return "pos".
        Specified by:
        requirementsSatisfied in interface Annotator