src/Generic/Cbrne/results/CBRNEResultCollector.cpp
// determines whether "entity" is valid for output: i.e., whether it has at least 1
// name or descriptor mention associated with it

determines whether "entity" is valid for output: i.e., whether it has at least 1
name or descriptor mention associated with it
determines whether " entity " is valid for output : i . e . whether it has at least 1 name or descriptor mention associated with it
bool CBRNEResultCollector::isValidEntity(const Entity *entity) {
	int nameCount = 0, descCount = 0;
	int i;
	for(i=0; i<entity->getNMentions(); i++) {
		Mention *mention = _docTheory->getEntitySet()->getMention(entity->getMention(i));
		Mention::Type mentionType = fixPartitiveCase(mention->getMentionType());
		if(mentionType == Mention::NAME) nameCount++;
		if(mentionType == Mention::DESC) descCount++;
	}
	return (nameCount || descCount);
}
bool CBRNEResultCollector :: isValidEntity ( const Entity * entity ) { int nameCount = 0 , descCount = 0 ; int i ; for ( i = 0 ; i < entity -> getNMentions ( ) ; i ++ ) { Mention * mention = _docTheory -> getEntitySet ( ) -> getMention ( entity -> getMention ( i ) ) ; Mention :: Type mentionType = fixPartitiveCase ( mention -> getMentionType ( ) ) ; if ( mentionType == Mention :: NAME ) nameCount ++ ; if ( mentionType == Mention :: DESC ) descCount ++ ; } return ( nameCount || descCount ) ; }
determines whether "entity" is valid for output: i.e., whether it has at least 1
name or descriptor mention associated with it
determines whether " entity " is valid for output : i . e . whether it has at least 1 name or descriptor mention associated with it