edu.stanford.nlp.ie
Class NERClassifierCombiner
java.lang.Object
edu.stanford.nlp.ie.AbstractSequenceClassifier<IN>
edu.stanford.nlp.ie.ClassifierCombiner<CoreLabel>
edu.stanford.nlp.ie.NERClassifierCombiner
- All Implemented Interfaces:
- Function<java.lang.String,java.lang.String>
public class NERClassifierCombiner
- extends ClassifierCombiner<CoreLabel>
Subclass of ClassifierCombiner that behaves like a NER, by copying the AnswerAnnotation labels to NERAnnotation
Also, it runs an additional classifier (QuantifiableEntityNormalizer) to recognize numeric entities
- Author:
- Mihai Surdeanu
| Methods inherited from class edu.stanford.nlp.ie.AbstractSequenceClassifier |
apply, backgroundSymbol, classify, classifyAndWriteAnswers, classifyAndWriteAnswers, classifyAndWriteAnswers, classifyAndWriteAnswers, classifyAndWriteAnswers, classifyAndWriteAnswersKBest, classifyAndWriteAnswersKBest, classifyAndWriteViterbiSearchGraph, classifyFile, classifyFilesAndWriteAnswers, classifyFilesAndWriteAnswers, classifyKBest, classifyRaw, classifySentence, classifySentenceWithGlobalInformation, classifyStdin, classifyStdin, classifyToCharacterOffsets, classifyToString, classifyToString, classifyWithInlineXML, countResults, countResults, countResultsIOB, countResultsIOB2, defaultReaderAndWriter, getSampler, getSequenceModel, getViterbiSearchGraph, loadClassifier, loadClassifier, loadClassifier, loadClassifier, loadClassifier, loadClassifier, loadClassifierNoExceptions, loadClassifierNoExceptions, loadClassifierNoExceptions, loadClassifierNoExceptions, loadClassifierNoExceptions, loadJarClassifier, makeObjectBankFromFile, makeObjectBankFromFiles, makeObjectBankFromFiles, makeObjectBankFromFiles, makeObjectBankFromReader, makeObjectBankFromString, makePlainTextReaderAndWriter, makeReaderAndWriter, plainTextReaderAndWriter, printFeatureLists, printFeatures, printProbs, printProbsDocuments, printResults, reinit, segmentString, segmentString, tallyOneEntityIOB, train, train, train, train, train, train, windowSize, writeAnswers |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
APPLY_NUMERIC_CLASSIFIERS_DEFAULT
public static final boolean APPLY_NUMERIC_CLASSIFIERS_DEFAULT
- See Also:
- Constant Field Values
APPLY_NUMERIC_CLASSIFIERS_PROPERTY
public static final java.lang.String APPLY_NUMERIC_CLASSIFIERS_PROPERTY
- See Also:
- Constant Field Values
NERClassifierCombiner
public NERClassifierCombiner(java.util.Properties props)
throws java.io.FileNotFoundException
- Throws:
java.io.FileNotFoundException
NERClassifierCombiner
public NERClassifierCombiner(java.lang.String... loadPaths)
throws java.io.FileNotFoundException
- Throws:
java.io.FileNotFoundException
NERClassifierCombiner
public NERClassifierCombiner(boolean applyNumericClassifiers,
boolean useSUTime,
java.lang.String... loadPaths)
throws java.io.FileNotFoundException
- Throws:
java.io.FileNotFoundException
NERClassifierCombiner
public NERClassifierCombiner(boolean applyNumericClassifiers,
boolean useSUTime,
java.util.Properties nscProps,
java.lang.String... loadPaths)
throws java.io.FileNotFoundException
- Throws:
java.io.FileNotFoundException
NERClassifierCombiner
public NERClassifierCombiner(AbstractSequenceClassifier<CoreLabel>... classifiers)
throws java.io.FileNotFoundException
- Throws:
java.io.FileNotFoundException
NERClassifierCombiner
public NERClassifierCombiner(boolean applyNumericClassifiers,
boolean useSUTime,
AbstractSequenceClassifier<CoreLabel>... classifiers)
throws java.io.FileNotFoundException
- Throws:
java.io.FileNotFoundException
appliesNumericClassifiers
public boolean appliesNumericClassifiers()
usesSUTime
public boolean usesSUTime()
classify
public java.util.List<CoreLabel> classify(java.util.List<CoreLabel> tokens)
- Description copied from class:
ClassifierCombiner
- Generates the AnswerAnnotation labels of the combined model for the given
tokens, storing them in place in the tokens.
- Overrides:
classify in class ClassifierCombiner<CoreLabel>
- Parameters:
tokens - A List of IN
- Returns:
- The passed in parameters, which will have the AnswerAnnotation field added/overwritten
classifyWithGlobalInformation
public java.util.List<CoreLabel> classifyWithGlobalInformation(java.util.List<CoreLabel> tokens,
CoreMap document,
CoreMap sentence)
- Description copied from class:
AbstractSequenceClassifier
- Classify a
List of something that extends CoreMap using as
additional information whatever is stored in the document and sentence.
This is needed for SUTime (NumberSequenceClassifier), which requires
the document date to resolve relative dates.
- Overrides:
classifyWithGlobalInformation in class ClassifierCombiner<CoreLabel>
- Returns:
- Classified version of the input tokenSequence
Stanford NLP Group