You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by pk...@apache.org on 2015/03/25 12:03:15 UTC

svn commit: r1669093 - /uima/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/HtmlConverter.java

Author: pkluegl
Date: Wed Mar 25 11:03:15 2015
New Revision: 1669093

URL: http://svn.apache.org/r1669093
Log:
UIMA-4286
- fixed javadoc

Modified:
    uima/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/HtmlConverter.java

Modified: uima/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/HtmlConverter.java
URL: http://svn.apache.org/viewvc/uima/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/HtmlConverter.java?rev=1669093&r1=1669092&r2=1669093&view=diff
==============================================================================
--- uima/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/HtmlConverter.java (original)
+++ uima/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/engine/HtmlConverter.java Wed Mar 25 11:03:15 2015
@@ -125,8 +125,9 @@ public class HtmlConverter extends JCasA
   private Boolean processAll;
 
   /**
-   * If this boolean parameter is set to true, then the tags of the complete document is processed
-   * and not only those tags within the body tag.
+   * If this boolean parameter is set to true, then zero-length annotation will not be dropped, but
+   * they will be assigned to the offset of the "nearest" annotation. In that case, a boolean
+   * feature names offsetsExpanded will be set to true if available.
    */
   public static final String PARAM_EXPAND_OFFSETS = "expandOffsets";
 
@@ -445,10 +446,10 @@ public class HtmlConverter extends JCasA
       Annotation annotation = iterator.get();
       best = annotation;
     } else {
-      Annotation dummy = new Annotation(jcas, source.getBegin(), source.getBegin() +1);
+      Annotation dummy = new Annotation(jcas, source.getBegin(), source.getBegin() + 1);
       iterator = jcas.getAnnotationIndex().iterator(dummy);
-      if(!iterator.isValid()) {
-        if((jcas.getDocumentText().length()/ 2) > source.getBegin()) {
+      if (!iterator.isValid()) {
+        if ((jcas.getDocumentText().length() / 2) > source.getBegin()) {
           iterator.moveToFirst();
           if (iterator.isValid()) {
             Annotation annotation = iterator.get();
@@ -463,8 +464,7 @@ public class HtmlConverter extends JCasA
         }
       }
     }
-    
-    
+
     return best;
   }