dictionaryByOccurrences and wordAnagrams definitions