src/ICEWS_LocRes_Branch/EventMentionPattern.cpp
// Constraint: document matches.
// Note that we only test bound-variable consistency against the parent (not against sibling sentence/document matches)

document matches.
Note that we only test bound-variable consistency against the parent (not against sibling sentence/document matches)
document matches . Note that we only test bound - variable consistency against the parent ( not against sibling sentence / document matches )
BOOST_FOREACH(Pattern_ptr pat, _documentMatches) {
		std::vector<PatternFeatureSet_ptr> docMatches = pat->castTo<DocumentMatchingPattern>()->multiMatchesDocument(patternMatcher);
		bool found_match = false;
		for (std::vector<PatternFeatureSet_ptr>::const_iterator iter = docMatches.begin(); iter != docMatches.end(); iter++) {
			std::map<std::wstring, Symbol> local_variables;
			if (getAndCheckBoundVariables(*iter, patternMatcher->getDocTheory(), bound_variables, local_variables)) {
				result->addFeatures(*iter);
				found_match = true;
				break;
			}
		}
		if (!found_match)
			return PatternFeatureSet_ptr();
	}
BOOST_FOREACH ( Pattern_ptr pat , _documentMatches ) { std :: vector < PatternFeatureSet_ptr > docMatches = pat -> castTo < DocumentMatchingPattern > ( ) -> multiMatchesDocument ( patternMatcher ) ; bool found_match = false ; for ( std :: vector < PatternFeatureSet_ptr > :: const_iterator iter = docMatches . begin ( ) ; iter != docMatches . end ( ) ; iter ++ ) { std :: map < std :: wstring , Symbol > local_variables ; if ( getAndCheckBoundVariables ( * iter , patternMatcher -> getDocTheory ( ) , bound_variables , local_variables ) ) { result -> addFeatures ( * iter ) ; found_match = true ; break ; } } if ( ! found_match ) return PatternFeatureSet_ptr ( ) ; }
Constraint: document matches.
Constraint : document matches .