src/PredFinder/inference/EITbdAdapter.cpp
/**
 * Get appropriate patient type for this event and argument, e.g. ic:Person. 
 * The entity subtype does NOT include a "guessed default", so you must account
 * for UNDET.
 *
 * @param tbd_event_type Name of the event type from the pattern set
 * @param et Entity type of the argument
 * @param est Entity subtype of the argument
 *
 * @author eboschee@bbn.com
 * @date 2010.12.12
 **/
Get appropriate patient type for this event and argument, e.g. ic:Person.
The entity subtype does NOT include a "guessed default", so you must account
for UNDET.

@param tbd_event_type Name of the event type from the pattern set
@param et Entity type of the argument
@param est Entity subtype of the argument


Get appropriate patient type for this event and argument e . g . ic : Person . The entity subtype does NOT include a " guessed default " so you must account for UNDET . @param tbd_event_type Name of the event type from the pattern set @param et Entity type of the argument @param est Entity subtype of the argument
std::wstring EITbdAdapter::getPatientType(const std::wstring & tbd_event_type, 
												  const EntityType & et, const EntitySubtype & est) {
	throw_if_not_initialized();
	if (tbd_event_type.compare(L"bombing") == 0 || tbd_event_type.compare(L"attack") == 0) {
		if (et.matchesGPE())
			return L"ic:GeopoliticalEntity";
		else if (et.matchesLOC())
			return L"ic:Location";
		else if (et.matchesFAC() || et.matchesPER() || et.matchesORG())
			return L"ic:PhysicalThing"; 
		else if (et.getName() == Symbol(L"VEH"))
			return L"ic:PhysicalThing";
		else SessionLogger::info("LEARNIT") << "invalid target for " << tbd_event_type << "\n";
	} else if (tbd_event_type.compare(L"killing") == 0 || tbd_event_type.compare(L"injury") == 0) {
		if (est.getName() == Symbol(L"Group"))
			return L"ic:PersonGroup";
		else return L"ic:Person";
	} 
	return L"";
}
std :: wstring EITbdAdapter :: getPatientType ( const std :: wstring & tbd_event_type , const EntityType & et , const EntitySubtype & est ) { throw_if_not_initialized ( ) ; if ( tbd_event_type . compare ( L" " ) == 0 || tbd_event_type . compare ( L" " ) == 0 ) { if ( et . matchesGPE ( ) ) return L" " ; else if ( et . matchesLOC ( ) ) return L" " ; else if ( et . matchesFAC ( ) || et . matchesPER ( ) || et . matchesORG ( ) ) return L" " ; else if ( et . getName ( ) == Symbol ( L" " ) ) return L" " ; else SessionLogger :: info ( " " ) << " " << tbd_event_type << " \n " ; } else if ( tbd_event_type . compare ( L" " ) == 0 || tbd_event_type . compare ( L" " ) == 0 ) { if ( est . getName ( ) == Symbol ( L" " ) ) return L" " ; else return L" " ; } return L" " ; }
Get appropriate patient type for this event and argument, e.g.
Get appropriate patient type for this event and argument e . g .