Commit e223f341 authored by Shyam Upadhyay's avatar Shyam Upadhyay
Browse files

major change

parent 484797cd
...@@ -16,7 +16,7 @@ public class VoiceClauseHeuristic extends Heuristic { ...@@ -16,7 +16,7 @@ public class VoiceClauseHeuristic extends Heuristic {
String clause =TAUtils.getClauseNature(ee.pred_srl); String clause =TAUtils.getClauseNature(ee.pred_srl);
String lemma = TAUtils.getLemma(ee.pred_srl); String lemma = TAUtils.getLemma(ee.pred_srl);
String srl_type= ee.pred_srl.getViewName(); String srl_type= ee.pred_srl.getViewName();
boolean isFirst=TAUtils.isFirstVerbPredicateInList(ee, others); boolean isFirst=TAUtils.isFirstNonAppVerbPredicateInList(ee, others);
if(voice.equals("A")) if(voice.equals("A"))
{ {
......
...@@ -228,7 +228,7 @@ public class Evaluator { ...@@ -228,7 +228,7 @@ public class Evaluator {
{ {
String voice = TAUtils.voiceFeat(pred.pred_srl).getName(); String voice = TAUtils.voiceFeat(pred.pred_srl).getName();
String clause =TAUtils.getClauseNature(pred.pred_srl); String clause =TAUtils.getClauseNature(pred.pred_srl);
boolean isFirst=TAUtils.isFirstVerbPredicateInList(pred, predevents); boolean isFirst=TAUtils.isFirstNonAppVerbPredicateInList(pred, predevents);
boolean inapp=TAUtils.isInAppositive(pred.pred_srl); boolean inapp=TAUtils.isInAppositive(pred.pred_srl);
System.out.println(pred+" "+voice+" "+clause+" "+isFirst+" "+inapp); System.out.println(pred+" "+voice+" "+clause+" "+isFirst+" "+inapp);
} }
......
...@@ -329,15 +329,17 @@ public class TAUtils { ...@@ -329,15 +329,17 @@ public class TAUtils {
return ""; return "";
} }
public static boolean isFirstVerbPredicateInList(EventInstance ee, List<EventInstance> others) { public static boolean isFirstNonAppVerbPredicateInList(EventInstance ee, List<EventInstance> others) {
if(!ee.pred_srl.getViewName().equals("SRL_VERB")) if(!ee.pred_srl.getViewName().equals("SRL_VERB"))
{ {
return false; return false;
} }
for(EventInstance ev:others) for(EventInstance ev:others)
{ {
if(ev.start<ee.start && ev.end < ee.end && ev.pred_srl.getViewName().equals("SRL_VERB")) if(!TAUtils.isInAppositive(ev.pred_srl)) {
return false; if (ev.start < ee.start && ev.end < ee.end && ev.pred_srl.getViewName().equals("SRL_VERB"))
return false;
}
} }
return true; return true;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment