Package edu.stanford.nlp.ie.machinereading.structure

Examples of edu.stanford.nlp.ie.machinereading.structure.Span.start()


        List<CoreLabel> tokens = sentence.get(CoreAnnotations.TokensAnnotation.class);
        for (EntityMention en : entities) {
          //System.out.println("old ner tag for " + en.getExtentString() + " was " + en.getType());
          Span s = en.getExtent();
          Counter<String> allNertagforSpan = new ClassicCounter<String>();
          for (int i = s.start(); i < s.end(); i++) {
            allNertagforSpan.incrementCount(tokens.get(i).ner());
          }
          String entityNertag = Counters.argmax(allNertagforSpan);
          en.setType(entityNertag);
          //System.out.println("new ner tag is " + entityNertag);
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.