I checked the different questions for this problem and the answers and found a code that helped me with a small set of words (1000 types/unique words): https://stats.stackex