private static String cleanText ( String strText ) { strText = HTMLParser . unsafeRemoveAllTags ( strText ) ; strText = strText . toLowerCase ( Locale . ENGLISH ) ; strText = StringCleaner . unifyTerminators ( strText ) ; strText = strText . replaceAll ( " [0-9]+ " , " " ) ; // Remove "words" comprised only of numbers strText = StringCleaner . removeExtraSpaces ( strText ) ; return strText ; }
Trims removes line breaks multiple spaces and generally cleans text before processing .