Here you can find the source of cleanText(String t)
private static String cleanText(String t)
//package com.java2s; //License from project: Apache License public class Main { private static String cleanText(String t) { t = t.replaceAll("(,|:|;)", " "); t = t.replaceAll(" ", " "); t = t.replaceAll("\\n", " "); t = t.replaceAll("([\\.]\\s)", ".1. .0. "); t = t.replaceAll(" ", " "); t = t.replaceAll(" ", " "); t = t.trim();//from w w w . ja v a 2s . c o m return t; } }