ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chen...@apache.org
Subject svn commit: r1488029 - in /ctakes/sandbox/ctakes-sectionizer/src: main/java/org/apache/ctakes/core/ae/CDASegmentAnnotator.java test/java/org/apache/ctakes/core/ae/TestCDASegmentAnnotator.java
Date Thu, 30 May 2013 21:48:35 GMT
Author: chenpei
Date: Thu May 30 21:48:34 2013
New Revision: 1488029

URL: http://svn.apache.org/r1488029
Log:
CTAKES-200 refined the regex for sections a bit.  allow any spaces for the match.

Modified:
    ctakes/sandbox/ctakes-sectionizer/src/main/java/org/apache/ctakes/core/ae/CDASegmentAnnotator.java
    ctakes/sandbox/ctakes-sectionizer/src/test/java/org/apache/ctakes/core/ae/TestCDASegmentAnnotator.java

Modified: ctakes/sandbox/ctakes-sectionizer/src/main/java/org/apache/ctakes/core/ae/CDASegmentAnnotator.java
URL: http://svn.apache.org/viewvc/ctakes/sandbox/ctakes-sectionizer/src/main/java/org/apache/ctakes/core/ae/CDASegmentAnnotator.java?rev=1488029&r1=1488028&r2=1488029&view=diff
==============================================================================
--- ctakes/sandbox/ctakes-sectionizer/src/main/java/org/apache/ctakes/core/ae/CDASegmentAnnotator.java
(original)
+++ ctakes/sandbox/ctakes-sectionizer/src/main/java/org/apache/ctakes/core/ae/CDASegmentAnnotator.java
Thu May 30 21:48:34 2013
@@ -112,7 +112,7 @@ public class CDASegmentAnnotator extends
 		for (int i = 1; i < line.length; i++) {
 			// Build the RegEx pattern for each comma delimited header name
 			// Suffixed with a aggregator pipe
-			sb.append(line[i].trim());
+			sb.append("\\s*" + line[i].trim() + "\\s*");
 			if (i != line.length - 1) {
 				sb.append("|");
 			}

Modified: ctakes/sandbox/ctakes-sectionizer/src/test/java/org/apache/ctakes/core/ae/TestCDASegmentAnnotator.java
URL: http://svn.apache.org/viewvc/ctakes/sandbox/ctakes-sectionizer/src/test/java/org/apache/ctakes/core/ae/TestCDASegmentAnnotator.java?rev=1488029&r1=1488028&r2=1488029&view=diff
==============================================================================
--- ctakes/sandbox/ctakes-sectionizer/src/test/java/org/apache/ctakes/core/ae/TestCDASegmentAnnotator.java
(original)
+++ ctakes/sandbox/ctakes-sectionizer/src/test/java/org/apache/ctakes/core/ae/TestCDASegmentAnnotator.java
Thu May 30 21:48:34 2013
@@ -57,8 +57,8 @@ public class TestCDASegmentAnnotator {
 		JCasIterable casIter = new JCasIterable(reader, sectionAnnotator,
 				dumpOutput);
 		final String expected_hpi_section = "1.3.6.1.4.1.19376.1.5.3.1.3.4";
-		final int expected_begin = 219;
-		final int expected_end = 1612;
+		final int expected_begin = 220;
+		final int expected_end = 1610;
 		boolean section_exists = false;
 		int section_begin = 0;
 		int section_end = 0;



Mime
View raw message