ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r1764358 - in /ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal: ae/EventEventRelationAnnotator.java eval/EvaluationOfEventEventThymeRelations.java
Date Tue, 11 Oct 2016 21:14:13 GMT
Author: clin
Date: Tue Oct 11 21:14:13 2016
New Revision: 1764358

URL: http://svn.apache.org/viewvc?rev=1764358&view=rev
Log:
remove event expansion for event-event relations.

Modified:
    ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/EventEventRelationAnnotator.java
    ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventEventThymeRelations.java

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/EventEventRelationAnnotator.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/EventEventRelationAnnotator.java?rev=1764358&r1=1764357&r2=1764358&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/EventEventRelationAnnotator.java
(original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/EventEventRelationAnnotator.java
Tue Oct 11 21:14:13 2016
@@ -199,8 +199,8 @@ public class EventEventRelationAnnotator
 		//	      }
 		//	    }
 
-		Map<EventMention, Collection<EventMention>> coveringMap =
-				JCasUtil.indexCovering(jCas, EventMention.class, EventMention.class);
+//		Map<EventMention, Collection<EventMention>> coveringMap =
+//				JCasUtil.indexCovering(jCas, EventMention.class, EventMention.class);
 
 		List<IdentifiedAnnotationPair> pairs = Lists.newArrayList();
 		List<EventMention> events = new ArrayList<>(JCasUtil.selectCovered(jCas, EventMention.class,
sentence));
@@ -238,29 +238,29 @@ public class EventEventRelationAnnotator
 
 				//				List<EventMention> key = Arrays.asList(eventA, eventB);
 				
-				if(this.isTraining()){
-					//pairing covering system events:
-					if(eventAMedical || eventBMedical){
-						for (EventMention event1 : coveringMap.get(eventA)){
-							if(!hasOverlap(event1,eventB)){//don't generate overlapping arguments
-								pairs.add(new IdentifiedAnnotationPair(event1, eventB));
-							}
-
-							for(EventMention event2 : coveringMap.get(eventB)){
-								if(!hasOverlap(event1,event2)){//don't generate overlapping arguments
-									pairs.add(new IdentifiedAnnotationPair(event1, event2));
-								}
-							}
-						}
-						//					}
-						//					if(eventBMedical && !eventAMedical){
-						for(EventMention event2 : coveringMap.get(eventB)){
-							if(!hasOverlap(eventA,event2)){//don't generate overlapping arguments
-								pairs.add(new IdentifiedAnnotationPair(eventA, event2));
-							}
-						}
-					}
-				}
+//				if(this.isTraining()){
+//					//pairing covering system events:
+//					if(eventAMedical || eventBMedical){
+//						for (EventMention event1 : coveringMap.get(eventA)){
+//							if(!hasOverlap(event1,eventB)){//don't generate overlapping arguments
+//								pairs.add(new IdentifiedAnnotationPair(event1, eventB));
+//							}
+//
+//							for(EventMention event2 : coveringMap.get(eventB)){
+//								if(!hasOverlap(event1,event2)){//don't generate overlapping arguments
+//									pairs.add(new IdentifiedAnnotationPair(event1, event2));
+//								}
+//							}
+//						}
+//						//					}
+//						//					if(eventBMedical && !eventAMedical){
+//						for(EventMention event2 : coveringMap.get(eventB)){
+//							if(!hasOverlap(eventA,event2)){//don't generate overlapping arguments
+//								pairs.add(new IdentifiedAnnotationPair(eventA, event2));
+//							}
+//						}
+//					}
+//				}
 				pairs.add(new IdentifiedAnnotationPair(eventA, eventB));
 
 			}

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventEventThymeRelations.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventEventThymeRelations.java?rev=1764358&r1=1764357&r2=1764358&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventEventThymeRelations.java
(original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventEventThymeRelations.java
Tue Oct 11 21:14:13 2016
@@ -338,7 +338,7 @@ EvaluationOfTemporalRelations_ImplBase{
 		//		aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(RemoveNonUMLSEvents.class));
 
 		//add unlabeled nearby system events as potential links: 
-		aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(AddEEPotentialRelations.class));
+//		aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(AddEEPotentialRelations.class));
 
 		aggregateBuilder.add(EventEventRelationAnnotator.createDataWriterDescription(
 				LibLinearStringOutcomeDataWriter.class,



Mime
View raw message