Package edu.stanford.nlp.pipeline
Class QuantifiableEntityNormalizingAnnotator
- java.lang.Object
-
- edu.stanford.nlp.pipeline.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 withQuantifiableEntityNormalizer. 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)
-
-
Field Summary
Fields Modifier and Type Field Description static StringBACKGROUND_SYMBOL_PROPERTYstatic StringCOLLAPSE_PROPERTY-
Fields inherited from interface edu.stanford.nlp.pipeline.Annotator
DEFAULT_REQUIREMENTS, STANFORD_CDC_TOKENIZE, STANFORD_CLEAN_XML, STANFORD_COLUMN_DATA_CLASSIFIER, STANFORD_COREF, STANFORD_COREF_MENTION, STANFORD_DEPENDENCIES, STANFORD_DETERMINISTIC_COREF, STANFORD_DOCDATE, STANFORD_ENTITY_MENTIONS, STANFORD_GENDER, STANFORD_KBP, STANFORD_LEMMA, STANFORD_LINK, STANFORD_MWT, STANFORD_NATLOG, STANFORD_NER, STANFORD_OPENIE, STANFORD_PARSE, STANFORD_POS, STANFORD_QUOTE, STANFORD_QUOTE_ATTRIBUTION, STANFORD_REGEXNER, STANFORD_RELATION, STANFORD_SENTIMENT, STANFORD_SSPLIT, STANFORD_TOKENIZE, STANFORD_TOKENSREGEX, STANFORD_TRUECASE, STANFORD_UD_FEATURES
-
-
Constructor Summary
Constructors Constructor Description QuantifiableEntityNormalizingAnnotator()QuantifiableEntityNormalizingAnnotator(boolean verbose)QuantifiableEntityNormalizingAnnotator(boolean verbose, boolean collapse)Do quantity entity normalization and collapse together multitoken quantity entities into a single token.QuantifiableEntityNormalizingAnnotator(String backgroundSymbol, boolean verbose)Do quantity entity normalization and collapse together multitoken quantity entities into a single token.QuantifiableEntityNormalizingAnnotator(String backgroundSymbol, boolean verbose, boolean collapse)QuantifiableEntityNormalizingAnnotator(String name, Properties props)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidannotate(Annotation annotation)Given an Annotation, perform a task on this Annotation.Set<Class<? extends CoreAnnotation>>requirementsSatisfied()Returns a set of requirements for which tasks this annotator can provide.Set<Class<? extends CoreAnnotation>>requires()Returns the set of tasks which this annotator requires in order to perform.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface edu.stanford.nlp.pipeline.Annotator
exactRequirements, unmount
-
-
-
-
Field Detail
-
BACKGROUND_SYMBOL_PROPERTY
public static final String BACKGROUND_SYMBOL_PROPERTY
- See Also:
- Constant Field Values
-
COLLAPSE_PROPERTY
public static final String COLLAPSE_PROPERTY
- See Also:
- Constant Field Values
-
-
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 symbolverbose- 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 messagescollapse- 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:AnnotatorGiven an Annotation, perform a task on this Annotation.
-
requires
public Set<Class<? extends CoreAnnotation>> requires()
Description copied from interface:AnnotatorReturns the set of tasks which this annotator requires in order to perform. For example, the POS annotator will return "tokenize", "ssplit".
-
requirementsSatisfied
public Set<Class<? extends CoreAnnotation>> requirementsSatisfied()
Description copied from interface:AnnotatorReturns a set of requirements for which tasks this annotator can provide. For example, the POS annotator will return "pos".- Specified by:
requirementsSatisfiedin interfaceAnnotator
-
-