Added getWordFrequency