commit baee8fe2374b14e4f01fb8fd090c4f411db84e59 Author: Tanmai Khanna Date: Tue Jul 23 02:37:00 2019 +0530 Added PP as impeding indicator (-1 if Noun is in PP) diff --git a/src/score.cc b/src/score.cc index 081c231..7bb3396 100644 --- a/src/score.cc +++ b/src/score.cc @@ -80,11 +80,11 @@ void Scoring::apply_indicators(unique_LU anaphor, ParseRef ref_file) antecedent_list.clear(); //clear it from the last anaphor //Go through the context and add properties based on external file - context = add_properties(context, ref_file); + deque< vector > context_with_prop = add_properties(context, ref_file); //dont add properties in the actual context (might wanna change) //Start going through sentences(current to earliest) and apply all indicators to modify scores of the NPs - for(deque< vector >::reverse_iterator i = context.rbegin(); i!=context.rend(); ++i) //read through the queue in reverse + for(deque< vector >::reverse_iterator i = context_with_prop.rbegin(); i!=context_with_prop.rend(); ++i) //read through the queue in reverse { firstNP = 1; //firstNP flag true @@ -116,6 +116,10 @@ void Scoring::apply_indicators(unique_LU anaphor, ParseRef ref_file) } //Impeding Indicators + if(contains(antecedent_LU.properties, L"PP")) + { + temp_score -= 1; //Prepositional NP + } //Add to Antecedent List with Score antecedent antecedent_with_score = {antecedent_LU, temp_score};