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) {