homework 3

autocorrection in practice


the minimum edit distance


In this homework, we will implement a functional and practical autocorrection and minimum edit distance algorithm. We will do so with dynamic programming algorithm determining the minimum edit distance. These models correct words that are 1 and 2 edit distances away. (We say two words are n edit distance away from each other when we need n edits to change one word into another.) Review the homework in this pdf file. Remember that reading resources can be found in the syllabus.



data and starter kit


You will need the code, corresponding utility functions, and shakespeare data at our website. Please develop in Python. If you are more comfortable with notebooks, there are several options:

You might find prototyping with Notebooks useful, but it is important that you submit a Python file and not a Notebook.


submission instructions


  • Submit your Python file assignment3.py via Gradescope before 5pm, Thursday, February 6.