Given this string we want count word occurrence (term frquency)
String input="this a test of tests",
This will split our phrase into words
Stream<String> stream = Stream.of(input.toLowerCase().split("\\s")).parallel();
How to edit a the stream values ,as follow : if a element of the stream ends with an "s" character then remove it.