Compute tag words and frequency