frequency of each word obtained