src/PredFinder/common/ElfMultiDoc.cpp
/**
 *  See whether there's a mapping from the normalized name and docid to a URI.
 *  If so, return it.  Otherwise, return an empty string.
 **/
See whether there's a mapping from the normalized name and docid to a URI.
If so, return it.  Otherwise, return an empty string.
See whether there ' s a mapping from the normalized name and docid to a URI . If so return it . Otherwise return an empty string .
std::wstring ElfMultiDoc::find_bound_uri_from_name_and_docid_in_specified_map(const std::wstring & s, 
																			  const std::wstring & docid, 
										const StringPairToSetOfStringsMap& name_docid_to_bound_uris){
	std::wstring normalized_best_string = UnicodeUtil::normalizeTextString(s);
	std::wstring docid_to_search(docid);
	SetOfStrings uris;
	StringPairToSetOfStringsMap::const_iterator val = name_docid_to_bound_uris.find(
		std::pair<std::wstring, std::wstring>(normalized_best_string, docid_to_search));
	if(val != _name_docid_to_bound_uris.end()){
		uris = val->second;
	}
	std::wstring uri;
	size_t uri_count = uris.size();
	if (uri_count != 0) {
		uri = *(uris.begin());
	}
	return uri;
}
std :: wstring ElfMultiDoc :: find_bound_uri_from_name_and_docid_in_specified_map ( const std :: wstring & s , const std :: wstring & docid , const StringPairToSetOfStringsMap & name_docid_to_bound_uris ) { std :: wstring normalized_best_string = UnicodeUtil :: normalizeTextString ( s ) ; std :: wstring docid_to_search ( docid ) ; SetOfStrings uris ; StringPairToSetOfStringsMap :: const_iterator val = name_docid_to_bound_uris . find ( std :: pair < std :: wstring , std :: wstring > ( normalized_best_string , docid_to_search ) ) ; if ( val != _name_docid_to_bound_uris . end ( ) ) { uris = val -> second ; } std :: wstring uri ; size_t uri_count = uris . size ( ) ; if ( uri_count != 0 ) { uri = * ( uris . begin ( ) ) ; } return uri ; }
See whether there's a mapping from the normalized name and docid to a URI.
See whether there ' s a mapping from the normalized name and docid to a URI .
//SessionLogger::info("LEARNIT") << "name: <" << normalized_best_string << "> and docid: <" << docid_to_search << 
 //	"> yielded bound URI: <" << uri << ">" << std::endl;
 //if (uri_count > 1) {
 //	SessionLogger::info("LEARNIT") << "Warning: returned first URI match for team.";
 //}
