Examples of IdentifiedAnnotation


Examples of org.apache.ctakes.typesystem.type.textsem.IdentifiedAnnotation

  public void consumeHit(JCas jcas, Annotation focusAnnot, int scope,
      ContextHit ctxHit)
  {
    if (focusAnnot instanceof IdentifiedAnnotation)
    {
      IdentifiedAnnotation neAnnot = (IdentifiedAnnotation) focusAnnot;
      if (neAnnot.getTypeID() != 7 /*&& neAnnot.getTypeID() != 2*/ )
        neAnnot.setPolarity(-1);
    }

    createContextAnnot(jcas, focusAnnot, scope, ctxHit).addToIndexes();
  }
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.textsem.IdentifiedAnnotation

    System.out.println();
    for(BinaryTextRelation binaryTextRelation : JCasUtil.select(systemView, BinaryTextRelation.class)) {
           
      String category = binaryTextRelation.getCategory();
     
      IdentifiedAnnotation entity1; // entity whose role is "Argument"
      IdentifiedAnnotation entity2; // entity whose role is "Related_to"
     
      if(binaryTextRelation.getArg1().getRole().equals("Argument")) {
        entity1 = (IdentifiedAnnotation) binaryTextRelation.getArg1().getArgument();
        entity2 = (IdentifiedAnnotation) binaryTextRelation.getArg2().getArgument();
      } else {
        entity1 = (IdentifiedAnnotation) binaryTextRelation.getArg2().getArgument();
        entity2 = (IdentifiedAnnotation) binaryTextRelation.getArg1().getArgument();
      }
     
      String arg1 = entity1.getCoveredText();
      String arg2 = entity2.getCoveredText();
     
      int type1 = entity1.getTypeID();
      int type2 = entity2.getTypeID();
     
      // print relation and its arguments: location_of(colon/6, colon cancer/2)
      System.out.format("%s(%s/%d, %s/%d)\n", category, arg1, type1, arg2, type2);

      if(displayContext) {
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.