コード例 #1
0
 public static boolean hasSourceTarget(KafParticipant kafParticipant) {
   /**
    * <externalRef resource="VerbNet" reference="indicate-78@Topic"/> <externalRef
    * resource="FrameNet" reference="Communication@Message"/> <externalRef resource="FrameNet"
    * reference="Communication@Topic"/> <externalRef resource="FrameNet"
    * reference="Evidence@Proposition"/>
    */
   for (int i = 0; i < kafParticipant.getExternalReferences().size(); i++) {
     KafSense kafSense = kafParticipant.getExternalReferences().get(i);
     if (kafSense.getSensecode().endsWith("@Topic")
         || kafSense.getSensecode().endsWith("@Message")
         || kafSense.getSensecode().endsWith("@Theme")
         || kafSense.getSensecode().endsWith("@Proposition")) {
       return true;
     }
   }
   return false;
 }
コード例 #2
0
 public static boolean hasSourceTarget(
     KafParticipant kafParticipant, Vector<String> communicationVector) {
   /**
    * <externalRef resource="VerbNet" reference="indicate-78@Topic"/> <externalRef
    * resource="FrameNet" reference="Communication@Message"/> <externalRef resource="FrameNet"
    * reference="Communication@Topic"/> <externalRef resource="FrameNet"
    * reference="Evidence@Proposition"/>
    */
   for (int i = 0; i < kafParticipant.getExternalReferences().size(); i++) {
     KafSense kafSense = kafParticipant.getExternalReferences().get(i);
     if (communicationVector.contains(kafSense.getSensecode().toLowerCase())) {
       return true;
     }
     int idx = kafSense.getSensecode().lastIndexOf("@");
     if (idx > -1) {
       String role = kafSense.getSensecode().substring(idx);
       if (communicationVector.contains(role.toLowerCase())) {
         //  System.out.println("role = " + role);
         return true;
       }
     }
   }
   return false;
 }