src/PredFinder/inference/EIUtils.cpp
// this will only catch the first 

this will only catch the first
this will only catch the first
bool EIUtils::isNatBoundArg(EIDocData_ptr docData,
								 const ElfRelationArg_ptr& arg, std::set<std::wstring>& natBoundIDs) 
{
	bool ret = false;
	ElfIndividual_ptr indiv = arg->get_individual();
	if (indiv && indiv->has_entity_id()) {
		Entity *e = docData->getEntity(indiv->get_entity_id());
		if (e) {
			for (int i=0; i<e->getNMentions(); ++i) {
				const Mention* ment = docData->getEntitySet()->getMention(e->getMention(i));
				const SynNode* node = ment->getAtomicHead();
				std::wstring text = node->toTextString();
				boost::trim(text);
				BOOST_FOREACH(const EIUtils::NatTuple& natTuple, EIUtils::getNationalityPrefixedXDocFailures()) {
					if (text == natTuple.get<1>()) {
						if (EIUtils::hasCitizenship(docData, indiv, natTuple.get<0>())) {
							natBoundIDs.insert(natTuple.get<2>());
							ret = true;
						}
					}
				}
			}
		}
	}
	return ret;
}
bool EIUtils :: isNatBoundArg ( EIDocData_ptr docData , const ElfRelationArg_ptr & arg , std :: set < std :: wstring > & natBoundIDs ) { bool ret = false ; ElfIndividual_ptr indiv = arg -> get_individual ( ) ; if ( indiv && indiv -> has_entity_id ( ) ) { Entity * e = docData -> getEntity ( indiv -> get_entity_id ( ) ) ; if ( e ) { for ( int i = 0 ; i < e -> getNMentions ( ) ; ++ i ) { const Mention * ment = docData -> getEntitySet ( ) -> getMention ( e -> getMention ( i ) ) ; const SynNode * node = ment -> getAtomicHead ( ) ; std :: wstring text = node -> toTextString ( ) ; boost :: trim ( text ) ; BOOST_FOREACH ( const EIUtils :: NatTuple & natTuple , EIUtils :: getNationalityPrefixedXDocFailures ( ) ) { if ( text == natTuple . get < 1 > ( ) ) { if ( EIUtils :: hasCitizenship ( docData , indiv , natTuple . get < 0 > ( ) ) ) { natBoundIDs . insert ( natTuple . get < 2 > ( ) ) ; ret = true ; } } } } } } return ret ; }
this will only catch the first
this will only catch the first