Skip to content

ghorbanzade/splchk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

splchk

Build Status

splchk is an interactive command-line tool to find and fix potential spelling errors in a given text document.

username@hostname:~/$ spellcheck -h

usage: splchk [-hv] [[-i] input_file] [-p | -o output_file]
                      [-d dictionary_file]

  -d dictionary_file    file to be used as dictionary
  -h                    prints this message and exits
  -i input_file         file to check
  -o output_file        file to write corrected text into
  -p                    makes document to be modified in-place
  -v                    prints version and exits

splchk was originally developed as a solution to a final course project for the Programming in C course that I taught in Spring 2016.

Demo

To illustrate the look and feel of splchk, let us check for potential spelling errors in a sample-01.txt excerpt (from lumenlearning.com) using a small dictionary of 10,000 words and rewrite a processed version of the document in a new file sample-01.txt.out.

splchk dat/sample-01.txt

The application output is shown below:

splchk                                                        dat/sample-01.txt
-------------------------------------------------------------------------------

Word-processing programs usually have a spell-checker, but you should still
carefully check for correct changes in your words. This is because automatic
spell-checkers may not always understand the context of a word.

Misspelling a word might seem like a minor mistake, but it can reflect
very porly on a writer. It suggests one of two things: either the writer
does not care enough about his work to proofread it, or he does not know
his topic well enough to properly spell words related to it. Either way,
spelling errors will make a reader less likely to trust a writer’s authority.

-------------------------------------------------------------------------------
word "porly" not found in the dictionary
------------------------
(a) add to dictionary
(s) substitute word
(c) ignore word
(q) abort program

License

Source code is released under the MIT License.

About

Interactive command-line tool to find and fix spelling errors

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published