Examples of EventMention


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

            EntityMention entityMention = (EntityMention) ia;
            logger.error("Need to implement cases for handling EntityMention " + entityMention + " within relation: " + relation);
            logger.error("   severity " + severity + " in relation " + relation + " with/to " + entityMention);
            logger.error("   Using covered text: severity " + severity.getCoveredText() + " in relation " + relation + " with/to " + entityMention.getCoveredText());
          } else {
            EventMention eventMention = (EventMention) ia;
            if (eventMention instanceof DiseaseDisorderMention) {
              DiseaseDisorderMention ddm = (DiseaseDisorderMention) eventMention;
              logger.error("Need to implement attr for " + relation + " for DiseaseDisorderMention");
            } else if (eventMention instanceof SignSymptomMention) {
              SignSymptomMention ssm = (SignSymptomMention) eventMention;
              ssm.setSeverity(degreeOfTextRelation);
            } else {
              logger.error("Need to implement more cases for handling EventMention " + eventMention + " within relation: " + relation);
            }
          }
         
        } else if (relation.equals("location_of")) {

          EntityMention arg2Arg = (EntityMention) arg2.getArgument(); // wrongly created as EntityMention prior to 3.0
          IdentifiedAnnotation ia = mapToMentions.get(arg2Arg);

          if (ia instanceof EntityMention) {
           
            // Note you apparently can have an AnatomicalSiteMention be the location_of an AnatomicalSiteMention
            // from running rec041, end up with things like "Left lower extremity"  location_of "common femoral vein"
            // and "left renal vein" in relation location_of to anatomical site mention "renal vein"
            // and "vein" in relation location_of to anatomical site mention "renal vein"
            EntityMention entityMention = (EntityMention) ia;
            IdentifiedAnnotation location = (IdentifiedAnnotation) arg1.getArgument();
            IdentifiedAnnotation loc = (IdentifiedAnnotation)mapToMentions.get(location);
            if (loc instanceof AnatomicalSiteMention) {
              AnatomicalSiteMention asm = (AnatomicalSiteMention) loc;
              //asm.setBodyLocation(binaryTextRelation); // uncomment iff AnatomicalSiteMention ends up with a bodyLocation attribute
            } else {
              logger.error("Need to implement cases for handling EntityMention " + entityMention + " within relation: " + relation);
              logger.error("   loc " + loc + " in relation " + relation + " with/to " + entityMention);
              logger.error("   Using covered text: loc " + loc.getCoveredText() + " in relation " + relation + " with/to " + entityMention.getCoveredText());
            }

          } else {
           
            EventMention eventMention = (EventMention) ia;

            if (eventMention instanceof DiseaseDisorderMention) { //(eventMention.getTypeID()==CONST.NE_TYPE_ID_DISORDER) {
              DiseaseDisorderMention ddm = (DiseaseDisorderMention) eventMention;
              ddm.setBodyLocation(locationOfTextRelation);
            } else if (eventMention instanceof ProcedureMention) { //(eventMention.getTypeID()==CONST.NE_TYPE_ID_PROCEDURE) {
View Full Code Here

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

        newGoldEntityMention.addToIndexes();
      }

      for (EventMention oldSystemEventMention : JCasUtil.select(jCas, EventMention.class))
      {
        EventMention newGoldEventMention = new EventMention(goldView, oldSystemEventMention.getBegin(), oldSystemEventMention.getEnd());
       
        // copying assertion fields
        newGoldEventMention.setDiscoveryTechnique(oldSystemEventMention.getDiscoveryTechnique());
        newGoldEventMention.setUncertainty(oldSystemEventMention.getUncertainty());
        newGoldEventMention.setConditional(oldSystemEventMention.getConditional());
        newGoldEventMention.setGeneric(oldSystemEventMention.getGeneric());
        newGoldEventMention.setPolarity(oldSystemEventMention.getPolarity());
        newGoldEventMention.setSubject(oldSystemEventMention.getSubject());

        // copying non-assertion fields
        newGoldEventMention.setConfidence(oldSystemEventMention.getConfidence());

        newGoldEventMention.addToIndexes();
      }
     
      // TODO do we need to copy supporting feature structures (particularly ontology concept array)??

    } // end of method ReferenceIdentifiedAnnotationsSystemToGoldCopier.process()
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.