コード例 #1
0
ファイル: BenchmarkBinary.java プロジェクト: mayr/exemplar
 private RelationInstance createBinaryInstance(
     RelationInstance instance, Argument arg1, Argument arg2) {
   RelationInstance newInstance = new RelationInstance();
   String preposition = "";
   if (arg2.getArgumentType().startsWith("POBJ")) {
     preposition = arg2.getArgumentType().substring(5).toLowerCase();
   }
   newInstance.setAnnotatedSentence(instance.getAnnotatedSentence());
   newInstance.setNormalizedRelation(instance.getNormalizedRelation() + " " + preposition);
   newInstance.setOriginalRelation(instance.getOriginalRelation());
   newInstance.addArgument(arg1);
   newInstance.addArgument(arg2);
   return newInstance;
 }