text analysis class with a method to get a map of words frequency