You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ctakes.apache.org by dl...@apache.org on 2016/10/07 21:16:05 UTC
svn commit: r1763836 -
/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/nn/ae/EventEventTokenBasedAnnotator.java
Author: dligach
Date: Fri Oct 7 21:16:05 2016
New Revision: 1763836
URL: http://svn.apache.org/viewvc?rev=1763836&view=rev
Log:
reverting to chen's "original" version of getrelationcategory
Modified:
ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/nn/ae/EventEventTokenBasedAnnotator.java
Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/nn/ae/EventEventTokenBasedAnnotator.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/nn/ae/EventEventTokenBasedAnnotator.java?rev=1763836&r1=1763835&r2=1763836&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/nn/ae/EventEventTokenBasedAnnotator.java (original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/nn/ae/EventEventTokenBasedAnnotator.java Fri Oct 7 21:16:05 2016
@@ -66,7 +66,7 @@ public class EventEventTokenBasedAnnotat
String context;
if(arg2.getBegin() < arg1.getBegin()) {
// ... event2 ... event1 ... scenario
- System.out.println("\n-------------- aTHIS NEVER NAPPENS ------------\n");
+ System.out.println("\n-------------- THIS NEVER NAPPENS ------------\n");
context = EventEventRelPrinter.getTokensBetween(jCas, sentence, arg2, "e2", arg1, "e1", 2);
} else {
// ... event1 ... event2 ... scenario
@@ -119,7 +119,7 @@ public class EventEventTokenBasedAnnotat
* @param arg2
* @return
*/
- protected String getRelationCategory1(
+ protected String getRelationCategory(
Map<List<Annotation>, BinaryTextRelation> relationLookup,
IdentifiedAnnotation arg1,
IdentifiedAnnotation arg2) {
@@ -146,40 +146,10 @@ public class EventEventTokenBasedAnnotat
return category;
}
- /** Dima's way of getting labels
- * @param relationLookup
- * @param arg1
- * @param arg2
- * @return
- */
protected String getRelationCategory2(Map<List<Annotation>, BinaryTextRelation> relationLookup,
IdentifiedAnnotation arg1,
IdentifiedAnnotation arg2) {
- BinaryTextRelation relation = relationLookup.get(Arrays.asList(arg1, arg2));
- String category = null;
- if (relation != null) {
- category = relation.getCategory();
- if(arg1 instanceof EventMention) {
- category = category + "-1";
- }
- } else {
- relation = relationLookup.get(Arrays.asList(arg2, arg1));
- if (relation != null) {
- category = relation.getCategory();
- if(arg2 instanceof EventMention) {
- category = category + "-1";
- }
- }
- }
-
- return category;
- }
-
- protected String getRelationCategory(Map<List<Annotation>, BinaryTextRelation> relationLookup,
- IdentifiedAnnotation arg1,
- IdentifiedAnnotation arg2) {
-
// gold view representation (i.e. only contains relations)
BinaryTextRelation arg1ContainsArg2 = relationLookup.get(Arrays.asList(arg1, arg2));
BinaryTextRelation arg2ContainsArg1 = relationLookup.get(Arrays.asList(arg2, arg1));