commit 14b5ed6328f36f0181a77842e21316ec7e174b47 Author: Tanmai Khanna Date: Tue Jul 30 22:52:03 2019 +0530 All markables which mention a score will now be used automatically in score calculation diff --git a/src/score.cc b/src/score.cc index f14d72d..7f1af4f 100644 --- a/src/score.cc +++ b/src/score.cc @@ -119,9 +119,18 @@ void Scoring::apply_indicators(unique_LU anaphor, ParseRef ref_file) //Impeding Indicators - if(contains(antecedent_LU.properties, L"PP")) + //Indicators from XML file (iterate through all markables that provided a score) + + for(unordered_map::iterator x = markables_score.begin(); x != markables_score.end(); ++x) { - temp_score += markables_score[L"PP"]; //Prepositional NP + //cout << "Checking for: "; + //wcout << x->first; + //cout << "\n"; + + if(contains(antecedent_LU.properties, x->first)) //if markable name present in current antecedent + { + temp_score += x->second; //Add score to the temp score (could be negative also) + } } //Add to Antecedent List with Score