ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shalg...@apache.org
Subject svn commit: r1550586 - /ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/attributes/history/HistoryAttributeClassifier.java
Date Thu, 12 Dec 2013 23:27:38 GMT
Author: shalgrim
Date: Thu Dec 12 23:27:38 2013
New Revision: 1550586

URL: http://svn.apache.org/r1550586
Log:
comments a bit more clear

Modified:
    ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/attributes/history/HistoryAttributeClassifier.java

Modified: ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/attributes/history/HistoryAttributeClassifier.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/attributes/history/HistoryAttributeClassifier.java?rev=1550586&r1=1550585&r2=1550586&view=diff
==============================================================================
--- ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/attributes/history/HistoryAttributeClassifier.java
(original)
+++ ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/attributes/history/HistoryAttributeClassifier.java
Thu Dec 12 23:27:38 2013
@@ -253,11 +253,19 @@ public class HistoryAttributeClassifier 
 			}
 
 			// 2) some other identified annotation subsumes this one?
-			List<IdentifiedAnnotation> lsmentions = JCasUtil.selectCovering(jCas, IdentifiedAnnotation.class,
arg.getBegin(), arg.getEnd());
-			//lsmentions.addAll(JCasUtil.selectFollowing(jCas, IdentifiedAnnotation.class, arg, 5));
+			
+			// Get all IdentifiedAnnotations covering the boundaries of the
+			// annotation
+			List<IdentifiedAnnotation> lsmentions = JCasUtil.selectCovering(jCas,
+													IdentifiedAnnotation.class, arg.getBegin(),
+													arg.getEnd());
+
+			// NB: arg is annotation input to this method. annot is current
+			// lsmentions in loop
 			for (IdentifiedAnnotation annot : lsmentions) {
 				if ( annot.getBegin()>arg.getBegin()) {
-					// it's okay to break here b/c of the ordering?
+					// annot starts after our arg, so if ordered correctly(?)
+					// then I break b/c I won't find any more that cover arg
 					break;
 				}
 				
@@ -270,11 +278,10 @@ public class HistoryAttributeClassifier 
 						DependencyUtility.getNominalHeadNode(jCas, arg)) ) {
 					// INVARIANT: arg start at or before annot starts
 					// INVARIANT: arg ends at or before annot ends
-					// INVARIANT: arg falls within bounds of annot
-					// plus there's that deal that they don't have the same head node
-					// but now we have to verify that annot is an EventMention or EntityMention
+					// INVARIANT: ergo, arg falls within bounds of annot
+					// now verify that annot is an EventMention or EntityMention
 					if ((annot instanceof EntityMention) || (annot instanceof EventMention)) {
-						// Here annot has boundaries at or exceeding those of arg
+						// annot has boundaries at or exceeding those of arg.
 						// They also have different head nodes (I guess)
 						// and annot is either an EntityMention of EventMention
 						vfeat.put(SUBSUMED_ANNOT, true);		



Mime
View raw message