Make wordOccurrences and sentenceOccurrences functions.
Add code to create the dictionaryByOccurrences.