Generate word frequencies.