/* LanguageTool, a natural language style checker 
 * Copyright (C) 2005 Daniel Naber (http://www.danielnaber.de)
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
 * USA
 */
package de.danielnaber.languagetool.tokenizers.en;

import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;

import de.danielnaber.languagetool.tokenizers.Tokenizer;

/**
 * Tokenizes a sentence into words. Punctuation and whitespace gets its own token.
 * 
 * @author Daniel Naber
 */
public class EnglishWordTokenizer implements Tokenizer {

  public EnglishWordTokenizer() {
  }
  
  public List<String> tokenize(final String text) {
    List<String> l = new ArrayList<String>();
    StringTokenizer st = new StringTokenizer(text, " \u00a0,.;()[]{}!?:\"'’‘„“”\\/\n", true);
    while (st.hasMoreElements()) {
      l.add(st.nextToken());
    }
    return l;
  }
  
}

@@ -1421,16 +1421,154 @@
 xt, 
-%22 %5Cu00a0
+%0A        %22%5Cu0020%5Cu00A0%5Cu2000%5Cu2001%5Cu2002%5Cu2003%5Cu2004%5Cu2005%5Cu2006%22 %0A        + %22%5Cu2007%5Cu2008%5Cu2009%5Cu200A%5Cu200B%5Cu202F%5Cu205F%5Cu3000%5CuFEFF%22 %0A        + %22
 ,.;(
@@ -1583,16 +1583,17 @@
 %5C%22'%E2%80%99%E2%80%98%E2%80%9E%E2%80%9C%E2%80%9D
+%E2%80%A6
 %5C%5C/%5Cn%22, 

add unicode spaces etc. to English Word Tokenizer