Package edu.stanford.nlp.pipeline

Examples of edu.stanford.nlp.pipeline.Annotator.requires()


      Annotator parser = StanfordCoreNLP.getExistingAnnotator("parse");
      if (parser == null) {
        // TODO: these assertions rule out the possibility of alternately named parse/pos annotators
        throw new AssertionError("Failed to get parser - this should not be possible");
      }
      if (parser.requires().contains(Annotator.POS_REQUIREMENT)) {
        Annotator tagger = StanfordCoreNLP.getExistingAnnotator("pos");
        if (tagger == null) {
          throw new AssertionError("Parser required tagger, but failed to find the pos annotator");
        }
        List<Annotator> annotators = Generics.newArrayList();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.