Implement dictionaryByOccurrences and wordAnagrams.