List of usage examples for edu.stanford.nlp.ie NERClassifierCombiner classify
@Override
public List<CoreLabel> classify(List<CoreLabel> tokens)
From source file:lv.lumii.ner.analysis.ClassifierComparator.java
License:Open Source License
void classify(List<CoreLabel> document) { this.document = document; // initialize AnswersAnnotation for (CoreLabel c : document) { c.set(AnswersAnnotation.class, new ArrayList<String>()); }/*from ww w. j a va2 s .com*/ for (NERClassifierCombiner ncc : classifiers) { ncc.classify(document); for (CoreLabel c : document) { List<String> a = c.get(AnswersAnnotation.class); a.add(c.get(AnswerAnnotation.class)); c.set(AnswerAnnotation.class, null); c.set(AnswersAnnotation.class, a); } } }