src/LearnIt/LearnIt2Matcher.cpp
// turn every triggered slot filler map into a feature map

turn every triggered slot filler map into a feature map
turn every triggered slot filler map into a feature map
BOOST_FOREACH_PAIR(const SlotFillerMap& slotFillerMap, MatchRecord& info, 
						returnMatches) 
	{
		if (info.triggered) { 
			scoreMatchForNonTriggerFeatures(slotFillerMap, 
				info, slotFillers, doc_set, sent_theory->getSentNumber());
			double score = info.score;
			score = 1.0/(1.0 + exp(-score));
			if (score > _prob_threshold) {
				Target::SlotSet slotsFilled;
				for (SlotFillerMap::const_iterator slot_num_i = slotFillerMap.begin(); slot_num_i != slotFillerMap.end(); ++slot_num_i) {
					slotsFilled.push_back(slot_num_i->first);
				}
				if (_target->slotsSuffice(slotsFilled) 
					&& _target->checkCoreferentArguments(slotFillerMap)) 
				{
					std::wstring source=L"";
					if (_record_source) {
						source = info.sourceString();
					}
					MatchInfo::PatternMatch m = 
						slotFillerMapToPatternMatch(_target, 
						sent_theory, slotFillerMap,	score, source);
					m.provenance = info.createMatchProvenance();
					matches.push_back(m);
				}
			}
		}
	}
BOOST_FOREACH_PAIR ( const SlotFillerMap & slotFillerMap , MatchRecord & info , returnMatches ) { if ( info . triggered ) { scoreMatchForNonTriggerFeatures ( slotFillerMap , info , slotFillers , doc_set , sent_theory -> getSentNumber ( ) ) ; double score = info . score ; score = 1.0 / ( 1.0 + exp ( - score ) ) ; if ( score > _prob_threshold ) { Target :: SlotSet slotsFilled ; for ( SlotFillerMap :: const_iterator slot_num_i = slotFillerMap . begin ( ) ; slot_num_i != slotFillerMap . end ( ) ; ++ slot_num_i ) { slotsFilled . push_back ( slot_num_i -> first ) ; } if ( _target -> slotsSuffice ( slotsFilled ) && _target -> checkCoreferentArguments ( slotFillerMap ) ) { std :: wstring source = L" " ; if ( _record_source ) { source = info . sourceString ( ) ; } MatchInfo :: PatternMatch m = slotFillerMapToPatternMatch ( _target , sent_theory , slotFillerMap , score , source ) ; m . provenance = info . createMatchProvenance ( ) ; matches . push_back ( m ) ; } } } }
turn every triggered slot filler map into a feature map
turn every triggered slot filler map into a feature map
// if this matched at least one triggering feature...
 // add prior to each match and then transform scores into
 // probabilities
 // currently we ignore slot score... what is the right thing to do?
 // then check we passed the probability threshold
