""" Purpose: produce spell-check corrected text """ # define annotation markers CORRECTED_WORD_MARKER = "*" UNKNOWN_WORD_MARKER = "_" # get access to url support import url # most common words MOST_COMMON_URL = "http://www.cs.virginia.edu/~cs1112/words/most-common" # words correctsions CSV CORRECTIONS_URL = "http://www.cs.virginia.edu/~cs1112/words/corrections" # get contents of most common words url contents = url.get_contents( MOST_COMMON_URL ) # split contents into a list of good words good_words = ... # get corrections dictionary misspellings_dictionary = url.get_dictionary( CORRECTIONS_URL ) # get the user text to be checked reply = input( "Enter text: " ) # convert reply into a list of words text = ... # what now -- accumulate the spell check output of the user text output = ... ... # print spell check results print( output )