Here you can find the source of Tokenize(String sent)
public static ArrayList<String> Tokenize(String sent)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; public class Main { public static final String SPLIT_TOKENS = "[!\"#$%&'()*+,./:;<=>?\\[\\]^`{|}~\\s]"; public static ArrayList<String> Tokenize(String sent) { ArrayList<String> result = new ArrayList<String>(); String tokens[] = sent.split(SPLIT_TOKENS); //ArrayList<String> tokens = ST.extractTokens(sent, true); for (String token : tokens) { token = token.trim().toLowerCase(); if (token.length() == 0) continue; result.add(token);/*w w w . j a va2 s . c o m*/ } return result; } }