src/PredFinder/common/ElfMultiDoc.cpp
/**
 * Dumps a document level map of ACE entity ID --> canonical ID. 
 * Creating this table at the document level (rather than on a per-arg
 * basis) allows enforcing document level constraints on the mapping
 * (e.g., not creating a XDOC id for an entity if that id is shared by a
 * different entity in the document).
 *
 * @author mfreedma@bbn.com
 * @date 2011.01.05
 **/
Dumps a document level map of ACE entity ID --> canonical ID.
Creating this table at the document level (rather than on a per-arg
basis) allows enforcing document level constraints on the mapping
.


Dumps a document level map of ACE entity ID -- > canonical ID . Creating this table at the document level ( rather than on a per - arg basis ) allows enforcing document level constraints on the mapping .
void dumpStringsForEntity(const Entity* entity, const DocTheory* doc_theory){
	const EntitySet* entities = doc_theory->getEntitySet();
	SessionLogger::info("LEARNIT")<<"Entity: id-"<<entity->getID()<<" "<<entity->getType().getName().to_string()<<std::endl;
	name_mention_t best_name_mention = entity->getBestNameWithSourceMention(doc_theory);
	if(best_name_mention.second != 0 && best_name_mention.second->getMentionType() != Mention::NAME)
		return;	
	std::wstring normalized_best_string = UnicodeUtil::normalizeTextString(best_name_mention.first);
	SessionLogger::info("LEARNIT")<<"   Entity: "<<normalized_best_string<<"      -->";
	for(int j = 0; j < entity->getNMentions(); j++){
		const Mention* mention = entities->getMention(entity->getMention(j));
		if(mention->getMentionType() != Mention::NAME)
			continue;
		const SynNode* head = mention->getAtomicHead();
		if(head){
			std::wstring name_string = UnicodeUtil::normalizeTextString(head->toTextString());
			SessionLogger::info("LEARNIT")<<"("<<name_string<<"), ";
		}
	}
	SessionLogger::info("LEARNIT")<<std::endl;
}
void dumpStringsForEntity ( const Entity * entity , const DocTheory * doc_theory ) { const EntitySet * entities = doc_theory -> getEntitySet ( ) ; SessionLogger :: info ( " " ) << " " << entity -> getID ( ) << " " << entity -> getType ( ) . getName ( ) . to_string ( ) << std :: endl ; name_mention_t best_name_mention = entity -> getBestNameWithSourceMention ( doc_theory ) ; if ( best_name_mention . second != 0 && best_name_mention . second -> getMentionType ( ) != Mention :: NAME ) return ; std :: wstring normalized_best_string = UnicodeUtil :: normalizeTextString ( best_name_mention . first ) ; SessionLogger :: info ( " " ) << " " << normalized_best_string << " " ; for ( int j = 0 ; j < entity -> getNMentions ( ) ; j ++ ) { const Mention * mention = entities -> getMention ( entity -> getMention ( j ) ) ; if ( mention -> getMentionType ( ) != Mention :: NAME ) continue ; const SynNode * head = mention -> getAtomicHead ( ) ; if ( head ) { std :: wstring name_string = UnicodeUtil :: normalizeTextString ( head -> toTextString ( ) ) ; SessionLogger :: info ( " " ) << " " << name_string << " " ; } } SessionLogger :: info ( " " ) << std :: endl ; }
Dumps a document level map of ACE entity ID --> canonical ID.
Dumps a document level map of ACE entity ID -- > canonical ID .
//this is a nameless mention
