Skip to content

Commit

Permalink
Implemented Application of Indicators and flow of scoring
Browse files Browse the repository at this point in the history
  • Loading branch information
khannatanmai committed Jul 4, 2019
1 parent 581e1bf commit 5e23338
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
26 changes: 21 additions & 5 deletions src/score.cc
Expand Up @@ -86,19 +86,35 @@ void Scoring::add_word(unsigned int input_id, wstring input_wordform, vector< ws
}
else if( contains(input_LU.pos_tags, L"det") && contains(input_LU.pos_tags, L"pos") )
{
//apply_indicators(input_LU);
showq(context);
apply_indicators(input_LU);
}
}
}
/*

void Scoring::apply_indicators(unique_LU anaphor)
{
//Start going through sentences(current to earliest) and apply all indicators to modify scores of the NPs
int distance_marker = 2; //starts from 2 for current sentence and reduces till -1 as we go to previous sentences

}
//Start going through sentences(current to earliest) and apply all indicators to modify scores of the NPs
for(deque< vector<unique_LU> >::reverse_iterator i = context.rbegin(); i!=context.rend(); ++i) //read through the queue in reverse
{
cout<<"\nSentence:" << distance_marker << "\n";
for (vector<unique_LU>::iterator j = (*i).begin(); j!=(*i).end(); ++j) //read through sentence
{
if(contains((*j).pos_tags, L"n"))
{

wcout<<(*j).wordform;
cout << ": " << (*j).score << "\n";
}
}

if(distance_marker > -1)
distance_marker--;
}
}

/*
void Scoring::referential_distance()
{
Expand Down
4 changes: 2 additions & 2 deletions src/score.h
Expand Up @@ -26,11 +26,11 @@ class Scoring
{
private:
deque< vector<unique_LU> > context; //A queue of sentences. Each sentence is a vector of Lexical Units
//unique_LU anaphor;
//vector<antecedent> antecedent_list; //A list of antecedents
vector<unique_LU> antecedent_list; //A list of antecedents

public:
void add_word(unsigned int input_id, wstring input_wordform, vector< wstring > pos_tags, wstring input_tl_wordform);
void apply_indicators(unique_LU anaphor);
//void referential_distance();
//wstring get_antecedent();
void clear();
Expand Down

0 comments on commit 5e23338

Please sign in to comment.