Class ClassifierCombiner<IN extends CoreMap & HasWord>

  • All Implemented Interfaces:
    Function<String,​String>
    Direct Known Subclasses:
    NERClassifierCombiner

    public class ClassifierCombiner<IN extends CoreMap & HasWord>
    extends AbstractSequenceClassifier<IN>
    Merges the outputs of two or more AbstractSequenceClassifiers according to a simple precedence scheme: any given base classifier contributes only classifications of labels that do not exist in the base classifiers specified before, and that do not have any token overlap with labels assigned by higher priority classifiers.

    This is a pure AbstractSequenceClassifier, i.e., it sets the AnswerAnnotation label. If you work with NER classifiers, you should use NERClassifierCombiner. This class inherits from ClassifierCombiner, and takes care that all AnswerAnnotations are also copied to NERAnnotation.

    You can specify up to 10 base classifiers using the -loadClassifier1 to -loadClassifier10 properties. We also maintain the older usage when only two base classifiers were accepted, specified using -loadClassifier and -loadAuxClassifier.

    ms 2009: removed all NER functionality (see NERClassifierCombiner), changed code so it accepts an arbitrary number of base classifiers, removed dead code.

    Author:
    Chris Cox, Mihai Surdeanu