src/Generic/theories/MentionConfidence.cpp
/* returns all mentions in sentence that are of requested mention type and which are linked
 * to an entity of the requested Entity type.
 */
returns all mentions in sentence that are of requested mention type and which are linked
to an entity of the requested Entity type.
returns all mentions in sentence that are of requested mention type and which are linked to an entity of the requested Entity type .
std::vector<const Mention *> MentionConfidence::mentionsMTypeEType(const DocTheory *docTheory, const Mention::Type mType, EntityType entType, int sentNo){
	const SentenceTheory *sentTheory = docTheory->getSentenceTheory(sentNo);
	const MentionSet *mentionSet = sentTheory->getMentionSet();
	std::vector<const Mention *> winners;
	for (int m = 0; m < mentionSet->getNMentions(); m++) {
		const Mention *other_ment = mentionSet->getMention(m);
		if ( mType != other_ment->getMentionType())
			continue;
		EntityType om_etype = other_ment->getEntityType();
		if ((entType != om_etype) &&
			!(entType.matchesORG() && om_etype.matchesGPE()) &&
			!(entType.matchesGPE() && om_etype.matchesORG()))
				continue;
		winners.push_back(other_ment);
	}
	return winners;
}
std :: vector < const Mention * > MentionConfidence :: mentionsMTypeEType ( const DocTheory * docTheory , const Mention :: Type mType , EntityType entType , int sentNo ) { const SentenceTheory * sentTheory = docTheory -> getSentenceTheory ( sentNo ) ; const MentionSet * mentionSet = sentTheory -> getMentionSet ( ) ; std :: vector < const Mention * > winners ; for ( int m = 0 ; m < mentionSet -> getNMentions ( ) ; m ++ ) { const Mention * other_ment = mentionSet -> getMention ( m ) ; if ( mType != other_ment -> getMentionType ( ) ) continue ; EntityType om_etype = other_ment -> getEntityType ( ) ; if ( ( entType != om_etype ) && ! ( entType . matchesORG ( ) && om_etype . matchesGPE ( ) ) && ! ( entType . matchesGPE ( ) && om_etype . matchesORG ( ) ) ) continue ; winners . push_back ( other_ment ) ; } return winners ; }
returns all mentions in sentence that are of requested mention type and which are linked
 to an entity of the requested Entity type.
returns all mentions in sentence that are of requested mention type and which are linked to an entity of the requested Entity type .
// we treat ORG and GPE as equivalent entity types for detecting reference conflicts
