The main control module has the same name as the programme itself. correct is responsible for determining user options and for reading misspellings from standard input and passing them on to ListCorrections.
Several user options can be specified on the programme's command line. -t specifies the name of the text file of the dictionary, and -i can specify the name of its index file. More interestingly, the -o option can be used to specify the sort order mode to be used by ListCorrections: dump, unique, paths, ruleProb, or kruskal. Only the first character of the mode is read, so abbreviations like -ok are permissible. One may also specify -m to ask that major word classes be displayed along with the misspellings. -s asks the programme to display relevant statistics: namely, the average frequency of the presumed sound-spelling correspondences for each respelling, and, in kruskal mode, the Levenshtein distance between each respelling and the misspelling.
Options not specified on the command line for a particular programme run can be set via Unix environmental variables. CORRECT_TEXT, CORRECT_INDEX, CORRECT_ORDER, and CORRECT_MAJOR allow the user to make a general declaration of his or her preferences, perhaps in the .login or .profile file.
If the user gives no indication of personal preferences, options default to -t /usr/local/dict/correctText -i /usr/local/dict/correctIndex -o kruskal, and major classes and statistics are not printed.