Spellcheck is a frontend to the libspellcheck library. It is also an example of how developers can use libspellcheck. Spellcheck is built at the same time as libspellcheck if you use the makefile. If you're wondering how to compile and install libspellcheck, go here.

This page is about Spellcheck v1.20. If you would like to view documentation for Spellcheck v1.15, go to Spellcheck (v1.15). However, we do reccomend that you upgrade to Spellcheck v1.20 since it supports spelling corrections.

Using spellcheck

Spellcheck is a command line application. With Spellcheck v1.15 you can now check the spelling of a string, and with v1.20, spelling suggestions are now provided for misspelled words. The documentation below is for version v1.20. For example:

$ spellcheck "heelo what is your name?"

1 word was spelled incorrectly.

The following words were misspelled:

heelo - Did you mean: hello?

If you would like to add the words above, use:

spellcheck -add [word you'd like to add] (Adds a word to the default dictionary english.dict)
spellcheck -add [word you'd like to add] -dict [dictionary file] (Adds a word to the dictionary file specified)

The default dictionary is stored in /etc/english.dict. If you have another dictionary, use:

$spellcheck "some words" -dict dictionary_file.dict

If you would like to add a word to the dictionary, use:

$spellcheck -add Linux
Added word 'Linux' to the default dictionary (english.dict)

You can also add a word to a custom dictionary:

$spellcheck -add Linux -dict dictionary_file.dict
Added word 'Linux' to the dictionary 'dictionary_file.dict'

Some other command line options are listed below:

spellcheck -version (Displays Spell Check Version Information)
spellcheck -license (Displays Spell Check License Information)
spellcheck -help (Displays this help message)

If you would like, you can use:

$man spellcheck

to view the spellcheck man page

Last edited Jul 31, 2013 at 3:06 PM by iankbhb, version 7


No comments yet.