Revision: 18827
          http://sourceforge.net/p/gate/code/18827
Author:   markagreenwood
Date:     2015-07-26 07:37:59 +0000 (Sun, 26 Jul 2015)
Log Message:
-----------
fixed the remove methods so they respect the case sensitive flag

Modified Paths:
--------------
    gate/trunk/src/main/gate/creole/gazetteer/DefaultGazetteer.java

Modified: gate/trunk/src/main/gate/creole/gazetteer/DefaultGazetteer.java
===================================================================
--- gate/trunk/src/main/gate/creole/gazetteer/DefaultGazetteer.java     
2015-07-26 01:20:09 UTC (rev 18826)
+++ gate/trunk/src/main/gate/creole/gazetteer/DefaultGazetteer.java     
2015-07-26 07:37:59 UTC (rev 18827)
@@ -246,6 +246,7 @@
     for(int i = 0; i< text.length(); i++) {
         currentChar = text.charAt(i);
         if ( Character.isSpaceChar(currentChar) || 
Character.isWhitespace(currentChar) ) currentChar = ' ';
+        if (!caseSensitive) Character.toUpperCase(currentChar);
         nextState = currentState.next(currentChar);
         if(nextState == null) return;//nothing to remove
         currentState = nextState;
@@ -488,6 +489,7 @@
     for(int i = 0; i< singleItem.length(); i++) {
         currentChar = singleItem.charAt(i);
         if ( Character.isSpaceChar(currentChar) || 
Character.isWhitespace(currentChar) ) currentChar = ' ';
+        if (!caseSensitive) Character.toUpperCase(currentChar);
         nextState = currentState.next(currentChar);
         if(nextState == null) {
           return false;

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to