src/Generic/events/stat/EventArgumentFinder.cpp
// given two vectors of MentionRolePair, one gold/key and the other predicted, calculate the number of matches

given two vectors of MentionRolePair, one gold/key and the other predicted, calculate the number of matches
given two vectors of MentionRolePair one gold / key and the other predicted calculate the number of matches
void EventArgumentFinder::tabulateStatistics(const std::vector<MentionRolePair>& key, const std::vector<MentionRolePair>& test) {
	int c = 0;
	for(unsigned keyIndex=0; keyIndex<key.size(); keyIndex++) {
		const Mention *keyMention = key[keyIndex].first;
		Symbol keyRole = key[keyIndex].second;
		for(unsigned testIndex=0; testIndex<test.size(); testIndex++) {
			if(keyMention == test[testIndex].first) {
				if(keyRole == test[testIndex].second) {
					c += 1;
					break;
				}
			}
		}
	}
	_correct_args += c;
	_correct_entity_mention += c;
	_missed += (static_cast<int>(key.size()) - c);
	_missed_entity_mention += (static_cast<int>(key.size()) - c);
	_spurious += (static_cast<int>(test.size()) - c);
	_spurious_entity_mention += (static_cast<int>(test.size()) - c);
}
void EventArgumentFinder :: tabulateStatistics ( const std :: vector < MentionRolePair > & key , const std :: vector < MentionRolePair > & test ) { int c = 0 ; for ( unsigned keyIndex = 0 ; keyIndex < key . size ( ) ; keyIndex ++ ) { const Mention * keyMention = key [ keyIndex ] . first ; Symbol keyRole = key [ keyIndex ] . second ; for ( unsigned testIndex = 0 ; testIndex < test . size ( ) ; testIndex ++ ) { if ( keyMention == test [ testIndex ] . first ) { if ( keyRole == test [ testIndex ] . second ) { c += 1 ; break ; } } } } _correct_args += c ; _correct_entity_mention += c ; _missed += ( static_cast < int > ( key . size ( ) ) - c ) ; _missed_entity_mention += ( static_cast < int > ( key . size ( ) ) - c ) ; _spurious += ( static_cast < int > ( test . size ( ) ) - c ) ; _spurious_entity_mention += ( static_cast < int > ( test . size ( ) ) - c ) ; }
given two vectors of MentionRolePair, one gold/key and the other predicted, calculate the number of matches
given two vectors of MentionRolePair one gold / key and the other predicted calculate the number of matches