getWordLengthProbabilities function

Get the probabilities for words of length [0..longest word in the text].

And correct some code mistake from getSentenceLengthProbabilities