Calculate word occurences in categories