In this homework, I need to work on maximum likelihood estimation in different circumstances. For the third part of the homework, I am asked to work on calculating the maximum likelihood estimation of unigrams and bigrams for a real dataset. Codes are attached in the report.