Examples of DrugChangeStatusAnnotation


Examples of org.apache.ctakes.drugner.type.DrugChangeStatusAnnotation

      }

    }
    else if (elementType == DrugChangeStatusAnnotation.type) {
      while (neItr.hasNext()) {
        DrugChangeStatusAnnotation nea = (DrugChangeStatusAnnotation) neItr.next();
        lastLocation[0] = nea.getBegin();
        lastLocation[1] = nea.getEnd();
        if (nea.getBegin()>=begin && nea.getEnd() <= end && (counter == || (counter> 0 && lastLocation[0] !=  location[counter - 1][0]))) {
          location[counter][0]= lastLocation[0];
          location[counter][1]= lastLocation[1];
          counter++;
        }
      }

    } else if (elementType == MedicationEventMention.type) {
      while (neItr.hasNext()) {
        MedicationEventMention nea = (MedicationEventMention) neItr.next();
        if(nea.getTypeID()==1 || nea.getTypeID()==0) {
          lastLocation[0]= nea.getBegin();
          lastLocation[1] = nea.getEnd();
          if ((counter == 0 || lastLocation[0] != location[counter-1][0]) && (nea.getBegin()>=begin && nea.getEnd() <= end)) {
            location[counter][0]= lastLocation[0];
            location[counter][1]= lastLocation[1];
            counter++;
          }

        }
      }
    } else if (elementType == PunctuationToken.type) {
      while (neItr.hasNext()) {
        boolean foundPair = false;
        PunctuationToken nea = (PunctuationToken) neItr.next();
        if (nea.getCoveredText().compareTo("(")==0)
          lastLocation[0] = nea.getBegin();
        else if (nea.getCoveredText().compareTo(")")==0) {
          lastLocation[1] = nea.getEnd();
          foundPair = true;
        }
        if (nea.getBegin()>=begin && nea.getEnd() <= end && foundPair && (counter == || (counter> 0 && lastLocation[0] !=  location[counter - 1][0]))) {
          location[counter][0]= lastLocation[0];
          location[counter][1]= lastLocation[1];
          counter++;
        }
      }
View Full Code Here

Examples of org.apache.ctakes.drugner.type.DrugChangeStatusAnnotation

      numElements++;
    }
    neItr = FSUtil.getAnnotationsIteratorInSpan(jcas,
        DrugChangeStatusAnnotation.type, begin, end);
    while (neItr.hasNext()) {
      DrugChangeStatusAnnotation nea = (DrugChangeStatusAnnotation) neItr.next();

      numElements++;
    }

    if (numElements > 1)
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.