ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seanfi...@apache.org
Subject svn commit: r1814585 - in /ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2: concept/BsvConceptFactory.java dictionary/BsvRareWordDictionary.java
Date Wed, 08 Nov 2017 14:49:57 GMT
Author: seanfinan
Date: Wed Nov  8 14:49:57 2017
New Revision: 1814585

URL: http://svn.apache.org/viewvc?rev=1814585&view=rev
Log:
Ignore empty lines in Bsv custom dictionaries

Modified:
    ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/concept/BsvConceptFactory.java
    ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/dictionary/BsvRareWordDictionary.java

Modified: ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/concept/BsvConceptFactory.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/concept/BsvConceptFactory.java?rev=1814585&r1=1814584&r2=1814585&view=diff
==============================================================================
--- ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/concept/BsvConceptFactory.java
(original)
+++ ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/concept/BsvConceptFactory.java
Wed Nov  8 14:49:57 2017
@@ -97,7 +97,7 @@ final public class BsvConceptFactory imp
                   = new BufferedReader( new InputStreamReader( FileLocator.getAsStream( bsvFilePath
) ) ) ) {
          String line = reader.readLine();
          while ( line != null ) {
-            if ( line.startsWith( "//" ) || line.startsWith( "#" ) ) {
+            if ( line.isEmpty() || line.startsWith( "//" ) || line.startsWith( "#" ) ) {
                line = reader.readLine();
                continue;
             }

Modified: ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/dictionary/BsvRareWordDictionary.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/dictionary/BsvRareWordDictionary.java?rev=1814585&r1=1814584&r2=1814585&view=diff
==============================================================================
--- ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/dictionary/BsvRareWordDictionary.java
(original)
+++ ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/dictionary/BsvRareWordDictionary.java
Wed Nov  8 14:49:57 2017
@@ -116,7 +116,7 @@ final public class BsvRareWordDictionary
                   = new BufferedReader( new InputStreamReader( FileLocator.getAsStream( bsvFilePath
) ) ) ) {
          String line = reader.readLine();
          while ( line != null ) {
-            if ( line.startsWith( "//" ) || line.startsWith( "#" ) ) {
+            if ( line.isEmpty() || line.startsWith( "//" ) || line.startsWith( "#" ) ) {
                line = reader.readLine();
                continue;
             }



Mime
View raw message