i wonder if there is anyway to convert a string into a text iterator then removing any desired tokens? supposed the string comes from a node’s text content, then want to look for specific words and then removing them.
Set<String> Words = new LinkedHashSet<String>();
BufferedReader br = new BufferedReader(new FileReader("useless words.txt"));
for(String line;(line = br.readLine()) != null;)
stopWords.add(line.trim().toString());
br.close();
Check out String replaceAll.