@@ -160,7 +160,7 @@ public List<CoreLabel> apply(String line) {
160
160
// TODO: can double chars be whitespace / isocontrol?
161
161
int codePoint = Character .codePointAt (line , index );
162
162
CoreLabel wi = new CoreLabel ();
163
- if ( ! Character .isWhitespace (codePoint ) && ! Character .isISOControl (codePoint )) {
163
+ if (! Character .isWhitespace (codePoint ) && !Character .isISOControl ( codePoint ) && ! Character . isSpaceChar (codePoint )) {
164
164
boolean surrogate = Character .isSupplementaryCodePoint (codePoint );
165
165
String wordString ;
166
166
if (surrogate ) {
@@ -171,7 +171,7 @@ public List<CoreLabel> apply(String line) {
171
171
wi .set (CoreAnnotations .CharAnnotation .class , intern (wordString ));
172
172
173
173
// non-breaking space is skipped as well
174
- while (Character .isWhitespace (origLine .charAt (origIndex )) || Character .isISOControl (origLine .charAt (origIndex )) || (origLine .charAt (origIndex ) == '\u00A0' )) {
174
+ while (Character .isWhitespace (origLine .charAt (origIndex )) || Character .isISOControl (origLine .charAt (origIndex )) || Character . isSpaceChar (origLine .charAt (origIndex ))) {
175
175
origIndex ++;
176
176
}
177
177
@@ -197,7 +197,7 @@ public List<CoreLabel> apply(String line) {
197
197
wi .set (CoreAnnotations .AnswerAnnotation .class , "1" );
198
198
wi .set (CoreAnnotations .SpaceBeforeAnnotation .class , "1" );
199
199
wi .set (CoreAnnotations .GoldAnswerAnnotation .class , "1" );
200
- } else if (Character .isWhitespace (line .charAt (index - 1 )) || Character .isISOControl (line .charAt (index - 1 ))) {
200
+ } else if (Character .isWhitespace (line .charAt (index - 1 )) || Character .isISOControl (line .charAt (index - 1 )) || Character . isSpaceChar ( line . charAt ( index - 1 )) ) {
201
201
wi .set (CoreAnnotations .AnswerAnnotation .class , "1" );
202
202
wi .set (CoreAnnotations .SpaceBeforeAnnotation .class , "1" );
203
203
wi .set (CoreAnnotations .GoldAnswerAnnotation .class , "1" );
0 commit comments