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

sentence matches.
Note that we only test bound-variable consistency against the parent (not against sibling sentence/document matches)
sentence matches . Note that we only test bound - variable consistency against the parent ( not against sibling sentence / document matches )
BOOST_FOREACH(Pattern_ptr pat, _sentenceMatches) {
		for (std::set<SentenceTheory*>::const_iterator it=sentTheories.begin(); it!=sentTheories.end(); ++it) {
			SentenceTheory *sentTheory = *it;
			std::vector<PatternFeatureSet_ptr> sentMatches = pat->castTo<SentenceMatchingPattern>()->multiMatchesSentence(patternMatcher, sentTheory);
			bool found_match = false;
			for (std::vector<PatternFeatureSet_ptr>::const_iterator iter = sentMatches.begin(); iter != sentMatches.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 , _sentenceMatches ) { for ( std :: set < SentenceTheory * > :: const_iterator it = sentTheories . begin ( ) ; it != sentTheories . end ( ) ; ++ it ) { SentenceTheory * sentTheory = * it ; std :: vector < PatternFeatureSet_ptr > sentMatches = pat -> castTo < SentenceMatchingPattern > ( ) -> multiMatchesSentence ( patternMatcher , sentTheory ) ; bool found_match = false ; for ( std :: vector < PatternFeatureSet_ptr > :: const_iterator iter = sentMatches . begin ( ) ; iter != sentMatches . 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: sentence matches.
Constraint : sentence matches .