}
}
protected static void loadTwitterData() throws IOException {
TWITTER_SAMPLES = new ArrayList<TextInstance<Boolean>>();
TwitterTokenizer tokenizer = new TwitterTokenizer(2, 2);
FileInputStream is = new FileInputStream(TWITTER_FILE);
BufferedReader br = new BufferedReader(new InputStreamReader(is));
try {
String line;
while ((line = br.readLine()) != null) {
try {
String[] values = line.split(",");
Boolean label = !values[0].equals("0");
String text = line.substring(line.indexOf(",") + 1);
TWITTER_SAMPLES.add(new TextInstance<Boolean>(label, tokenizer.tokenize(text)));
} catch (Exception ex) {
System.err.println("Skipped twitter sample because it can't be parsed : " + line);
}
}