commit 7c9a6655fd35ded16fad1ca0f2114a38002b73ae Author: Tanmai Khanna Date: Tue Jul 23 02:18:48 2019 +0530 Completed code to add properties after pattern matching diff --git a/src/pattern_ref.cc b/src/pattern_ref.cc index 508e724..005713a 100644 --- a/src/pattern_ref.cc +++ b/src/pattern_ref.cc @@ -129,14 +129,27 @@ deque< vector > add_properties(deque< vector > context, Pa //wcerr << (*(n+x)).wordform; } - if(match_flag == 1) + if(match_flag == 1) //if the entire pattern matched { //Add Property to the LUs + /* cerr << "\n"; wcerr << markable_name; cerr << " Pattern Matched at: "; wcerr << (*n).wordform; cerr << "\n"; + */ + + for(int x = 0; x < len_pattern; ++x) + { + ((*(n+x)).properties).push_back(markable_name); //add markable name to properties + + if(current_pattern[x].head == 1) + { + ((*(n+x)).properties).push_back(L"head"); // add "head" to properties + } + } + } } }