Author: seanfinan
Date: Tue Aug  8 18:25:41 2017
New Revision: 1804454

URL: http://svn.apache.org/viewvc?rev=1804454&view=rev
Log:
fix bug on empty documents

Modified:
    
ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/ae/RegexSectionizer.java

Modified: 
ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/ae/RegexSectionizer.java
URL: 
http://svn.apache.org/viewvc/ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/ae/RegexSectionizer.java?rev=1804454&r1=1804453&r2=1804454&view=diff
==============================================================================
--- 
ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/ae/RegexSectionizer.java
 (original)
+++ 
ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/ae/RegexSectionizer.java
 Tue Aug  8 18:25:41 2017
@@ -251,7 +251,7 @@ abstract public class RegexSectionizer e
       sectionTags.putAll( dividerLines );
       if ( sectionTags.isEmpty() ) {
          // whole text is simple segment
-         final Segment docSegment = new Segment( jcas, 0, docText.length() - 1 
);
+         final Segment docSegment = new Segment( jcas, 0, docText.length() );
          docSegment.setId( DEFAULT_SEGMENT_ID );
          docSegment.setPreferredText( DEFAULT_SEGMENT_ID );
          docSegment.addToIndexes();


Reply via email to