Examples of PSESentence


Examples of org.apache.ctakes.sideeffect.type.PSESentence

      if (!foundPSE)
        continue;

      if (foundPSE && foundDrug) {
        PSESentence ps = new PSESentence(jcas);
        ps.setBegin(sen.getBegin());
        ps.setEnd(sen.getEnd());
        ps.addToIndexes();
      } else if (foundPSE && !foundDrug) {
        int num = sen.getSentenceNumber();
        num = (num > 0) ? num - 1 : num;
        int[] previousSenSpan = SEUtil
            .getSentenceSpanOfGivenSentenceNum(jcas, num);

        // only if they are in the same line
        if (SEUtil.isSpanInSameLine(jcas, previousSenSpan[0],
            sen.getEnd())) {
          neIter = FSUtil.getAnnotationsInSpanIterator(jcas,
              IdentifiedAnnotation.type, previousSenSpan[0],
              previousSenSpan[1] + 1);
          while (neIter.hasNext()) {
            IdentifiedAnnotation n = (IdentifiedAnnotation) neIter
                .next();
            if (n.getTypeID() == 1) {
              PSESentence ps = new PSESentence(jcas);
              ps.setBegin(previousSenSpan[0]);
              ps.setEnd(sen.getEnd());
              ps.addToIndexes();
              break;
            }
          }
        }
      }
View Full Code Here

Examples of org.apache.ctakes.sideeffect.type.PSESentence

    JFSIndexRepository indexes = jcas.getJFSIndexRepository();
    Iterator pseSenIter = indexes.getAnnotationIndex(PSESentence.type)
        .iterator();

    while (pseSenIter.hasNext()) {
      PSESentence ps = (PSESentence) pseSenIter.next();
      List fea = new ArrayList();

      // get features
      fea.addAll(getLocationFeaturesFromMetaKeywords(jcas, ps));
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.