Package org.apache.uima.examples.opennlp

Examples of org.apache.uima.examples.opennlp.Sentence.addToIndexes()


    int sentenceOffsets[] = sentenceDetector.sentPosDetect(docText);
    int begin = 0;
    for (int i = 0; i < sentenceOffsets.length; i++) {
      Sentence sentence = new Sentence(aJCas, begin, sentenceOffsets[i]);
      sentence.setComponentId(COMPONENT_ID);
      sentence.addToIndexes();
      begin = sentenceOffsets[i];
    }
  }

}
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.