If I have two strings like those
s1 = "This is a foo bar sentence ."
s2 = "This sentence is similar to a foo bar sentence ."
And I want to split the string to be in this format
x1 = ["This":1,"is":1,"a":1,"bar":1,"sentence":1,"foo":1]
x2 = ["This":1,"is":1,"a":1,"bar":1,"sentence":2,"similar":1,"to":1,"foo":1]
It split the string words and count them, to a pair of where each string represent a word and the number represent the count of this word in the string.