added getWordFrequency()