I have this script that works as expected.
https://github.com/shantanuo/Spell-Checker/blob/master/main.py
But it is very slow because the csv file needs to be open