edu.stanford.nlp.pipeline
Class NERCombinerAnnotator

java.lang.Object
  extended by edu.stanford.nlp.pipeline.NERCombinerAnnotator
All Implemented Interfaces:
Annotator

public class NERCombinerAnnotator
extends java.lang.Object
implements Annotator

This class will add NER information to an Annotation using a combination of NER models. It assumes that the Annotation already contains the tokenized words as a List<? extends CoreLabel> or a List<List<? extends CoreLabel>> under Annotation.WORDS_KEY and adds NER information to each CoreLabel, in the CoreLabel.NER_KEY field. It uses the NERClassifierCombiner class in the ie package.

Author:
Jenny Finkel, Mihai Surdeanu (modified it to work with the new NERClassifierCombiner)

Nested Class Summary
 
Nested classes/interfaces inherited from interface edu.stanford.nlp.pipeline.Annotator
Annotator.Requirement
 
Field Summary
 
Fields inherited from interface edu.stanford.nlp.pipeline.Annotator
CLEAN_XML_REQUIREMENT, DETERMINISTIC_COREF_REQUIREMENT, GENDER_REQUIREMENT, GUTIME_REQUIREMENT, HEIDELTIME_REQUIREMENT, LEMMA_REQUIREMENT, NER_REQUIREMENT, NFL_REQUIREMENT, NFL_TOKENIZE_REQUIREMENT, NUMBER_REQUIREMENT, PARSE_AND_TAG, PARSE_REQUIREMENT, POS_REQUIREMENT, QUANTIFIABLE_ENTITY_NORMALIZATION_REQUIREMENT, SSPLIT_REQUIREMENT, STANFORD_CLEAN_XML, STANFORD_DETERMINISTIC_COREF, STANFORD_GENDER, STANFORD_LEMMA, STANFORD_NER, STANFORD_NFL, STANFORD_NFL_TOKENIZE, STANFORD_PARSE, STANFORD_POS, STANFORD_REGEXNER, STANFORD_SSPLIT, STANFORD_TOKENIZE, STANFORD_TRUECASE, STEM_REQUIREMENT, SUTIME_REQUIREMENT, TIME_WORDS_REQUIREMENT, TOKENIZE_AND_SSPLIT, TOKENIZE_REQUIREMENT, TOKENIZE_SSPLIT_NER, TOKENIZE_SSPLIT_PARSE, TOKENIZE_SSPLIT_PARSE_NER, TOKENIZE_SSPLIT_POS, TOKENIZE_SSPLIT_POS_LEMMA, TRUECASE_REQUIREMENT
 
Constructor Summary
NERCombinerAnnotator()
           
NERCombinerAnnotator(boolean verbose)
           
NERCombinerAnnotator(boolean verbose, java.lang.String... classifiers)
           
NERCombinerAnnotator(NERClassifierCombiner ner, boolean verbose)
           
 
Method Summary
 void annotate(Annotation annotation)
          Given an Annotation, perform a task on this Annotation.
 CoreMap doOneSentence(Annotation annotation, CoreMap sentence)
           
 java.util.Set<Annotator.Requirement> requirementsSatisfied()
          Returns a set of requirements for which tasks this annotator can provide.
 java.util.Set<Annotator.Requirement> 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
 

Constructor Detail

NERCombinerAnnotator

public NERCombinerAnnotator()
                     throws java.io.IOException,
                            java.lang.ClassNotFoundException
Throws:
java.io.IOException
java.lang.ClassNotFoundException

NERCombinerAnnotator

public NERCombinerAnnotator(boolean verbose)
                     throws java.io.IOException,
                            java.lang.ClassNotFoundException
Throws:
java.io.IOException
java.lang.ClassNotFoundException

NERCombinerAnnotator

public NERCombinerAnnotator(boolean verbose,
                            java.lang.String... classifiers)
                     throws java.io.IOException,
                            java.lang.ClassNotFoundException
Throws:
java.io.IOException
java.lang.ClassNotFoundException

NERCombinerAnnotator

public NERCombinerAnnotator(NERClassifierCombiner ner,
                            boolean verbose)
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

doOneSentence

public CoreMap doOneSentence(Annotation annotation,
                             CoreMap sentence)

requires

public java.util.Set<Annotator.Requirement> 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 java.util.Set<Annotator.Requirement> 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


Stanford NLP Group