incubator-ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dlig...@apache.org
Subject svn commit: r1447868 - in /incubator/ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/ae/baselines: Baseline2DegreeOfRelationExtractorAnnotator.java Baseline2EntityMentionPairRelationExtractorAnnotator.java
Date Tue, 19 Feb 2013 18:57:21 GMT
Author: dligach
Date: Tue Feb 19 18:57:20 2013
New Revision: 1447868

URL: http://svn.apache.org/r1447868
Log:
Update baseline 2 so that it subsumes baseline 1

Modified:
    incubator/ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/ae/baselines/Baseline2DegreeOfRelationExtractorAnnotator.java
    incubator/ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/ae/baselines/Baseline2EntityMentionPairRelationExtractorAnnotator.java

Modified: incubator/ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/ae/baselines/Baseline2DegreeOfRelationExtractorAnnotator.java
URL: http://svn.apache.org/viewvc/incubator/ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/ae/baselines/Baseline2DegreeOfRelationExtractorAnnotator.java?rev=1447868&r1=1447867&r2=1447868&view=diff
==============================================================================
--- incubator/ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/ae/baselines/Baseline2DegreeOfRelationExtractorAnnotator.java
(original)
+++ incubator/ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/ae/baselines/Baseline2DegreeOfRelationExtractorAnnotator.java
Tue Feb 19 18:57:20 2013
@@ -54,13 +54,10 @@ public class Baseline2DegreeOfRelationEx
 		List<Modifier> modifiers = JCasUtil.selectCovered(identifiedAnnotationView, Modifier.class,
sentence);
 		
     // look for sentences with multiple modifiers/arg2s and a single entity/arg1
-		if(! (modifiers.size() > 1 && entities.size() == 1)) {
+		if(! (modifiers.size() >= 1 && entities.size() == 1)) {
 		  return new ArrayList<IdentifiedAnnotationPair>();
 		}
 		
-		// TODO: it seems like we never get here
-		//       i.e. no sentences with multiple modifiers and a single entity
-		
 		List<IdentifiedAnnotationPair> pairs = new ArrayList<IdentifiedAnnotationPair>();
 		for (EntityMention entity : entities) {
 			for (Modifier modifier : modifiers) {

Modified: incubator/ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/ae/baselines/Baseline2EntityMentionPairRelationExtractorAnnotator.java
URL: http://svn.apache.org/viewvc/incubator/ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/ae/baselines/Baseline2EntityMentionPairRelationExtractorAnnotator.java?rev=1447868&r1=1447867&r2=1447868&view=diff
==============================================================================
--- incubator/ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/ae/baselines/Baseline2EntityMentionPairRelationExtractorAnnotator.java
(original)
+++ incubator/ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/ae/baselines/Baseline2EntityMentionPairRelationExtractorAnnotator.java
Tue Feb 19 18:57:20 2013
@@ -77,7 +77,7 @@ public class Baseline2EntityMentionPairR
 		    legitimateArg2Count++;
 		  }
 		}
-		if(! (legitimateArg1Count > 1 && legitimateArg2Count == 1)) {
+		if(! (legitimateArg1Count >= 1 && legitimateArg2Count == 1)) {
 		  return new ArrayList<IdentifiedAnnotationPair>();
 		}
 		



Mime
View raw message