src/PredFinder/elf/ElfDocument.cpp
// for each LearnIt2 matcher, let it match against the document

for each LearnIt2 matcher, let it match against the document
for each LearnIt2 matcher let it match against the document
BOOST_FOREACH(LearnIt2Matcher_ptr matcher, learnit2_matchers) {
		for (int sent_index = 0; sent_index < docData->getNSentences(); sent_index++) {
			SentenceTheory* sent_theory = docData->getSentenceTheory(sent_index);
			MatchInfo::PatternMatches matches = 
				matcher->match(docData->getDocTheory(), _id, sent_theory);
			BOOST_FOREACH(MatchInfo::PatternMatch match, matches) {
				try {
					ElfRelation_ptr relation = boost::make_shared<ElfRelation>(
						docData->getDocTheory(), sent_theory,
						matcher->target(), match, match.score, true);
					if (!match.source.empty()) {
						relation->add_source(match.source);
					}
					addTemporalAttributes(temporalAttributeAdder,relation,
							docData, sent_index);
					_relations.insert(relation);
				} catch (UnexpectedInputException& error) {
					SessionLogger::info("LEARNIT") << matcher->name() << " failed to create relation" << std::endl;
					if ((error.getSource() && strlen(error.getSource()) > 0) || 
						(error.getMessage() && strlen(error.getMessage()) > 0)) {
						SessionLogger::info("LEARNIT") << "    " << error.getSource() << ": " << error.getMessage() << std::endl;
					}
				}
			}
		}
	}
BOOST_FOREACH ( LearnIt2Matcher_ptr matcher , learnit2_matchers ) { for ( int sent_index = 0 ; sent_index < docData -> getNSentences ( ) ; sent_index ++ ) { SentenceTheory * sent_theory = docData -> getSentenceTheory ( sent_index ) ; MatchInfo :: PatternMatches matches = matcher -> match ( docData -> getDocTheory ( ) , _id , sent_theory ) ; BOOST_FOREACH ( MatchInfo :: PatternMatch match , matches ) { try { ElfRelation_ptr relation = boost :: make_shared < ElfRelation > ( docData -> getDocTheory ( ) , sent_theory , matcher -> target ( ) , match , match . score , true ) ; if ( ! match . source . empty ( ) ) { relation -> add_source ( match . source ) ; } addTemporalAttributes ( temporalAttributeAdder , relation , docData , sent_index ) ; _relations . insert ( relation ) ; } catch ( UnexpectedInputException & error ) { SessionLogger :: info ( " " ) << matcher -> name ( ) << " " << std :: endl ; if ( ( error . getSource ( ) && strlen ( error . getSource ( ) ) > 0 ) || ( error . getMessage ( ) && strlen ( error . getMessage ( ) ) > 0 ) ) { SessionLogger :: info ( " " ) << " " << error . getSource ( ) << " " << error . getMessage ( ) << std :: endl ; } } } } }
for each LearnIt2 matcher, let it match against the document
for each LearnIt2 matcher let it match against the document
// Create a new relation for this match
 //					_relations.insert(boost::make_shared<ElfRelation>(pattern, docData->getDocTheory(), sent_theory, match));
