Spell Check Reference




The ability to check the spelling of words, or entire documents, is a common function in todays applications that deal with text. Luckily CodeBench is no different, and now implements this feature to allow you to check the spelling of your project files.

Of course, dealing with programming languages is a lot different to writing a letter, but this feature can still be useful. For example, a lot of programming involves writing documentation, and it is here that this feature can be used. That does not mean you cannot check all document types in your projects, but texts that deal with programming can contain lots of words not typically found in a spoken language. It is for this reason that a warning will be issued if you try and check a document that might be an "include" or "source" file.

SpellCheck menu Due to this leading to a lot of occurrences of unknown words, there are a number of ways you can envoke the spell checking feature. As follows:

  • Simply select the "Check spelling/From the top" menu item, and the spell checker will start checking the current document from the top of the text. This is most useful for non-programming related documents.

  • Alternatively, you can place the cursor at the start of the section to be checked, and select the "Check spelling/From here" menu item. This will envoke the spell checker, but from the position of the cursor. This allows a section of the document to be checked, rather than the whole document. This is especially useful for checking readable texts embedded within source files, like documentation, or texts to be presented to the end user.

  • Lastly, you can double-click an area of text to highlight it, and then select the "Check spelling/From here" menu item. This will envoke the spell checker, but only to check the highlighted word. No further processing of the document will take place. This makes it easy to check whether certain words are correct or not, without the need to check the entire document.

The menu items mentioned above are available from the Editor popup menu, as well as the main program menus.


back to the top


The spell checking feature uses a "wordlist" to compare against. So, what is a wordlist?

Wordlists are exactly what they sound like. They are lists of words used for many applications, usually crossword solvers and spell checkers alike. There are many wordlists available from the internet, and because they can be downloaded, you could use one in the language of your choice. English is used by default, and the configuration panel offers a good wordlist which you can download.

Because these wordlists are usually covered under the GPL (or similar) licences, CodeBench does not include one with it. This means that you have to download one, and convert it into a format that CodeBench can use. More information can be found in the Preferences section.

From here, we shall assume you have downloaded a suitable wordlist, and have converted it.


back to the top


After selecting one of the ways to invoke the spell check feature, here is a typical response to a word that is spelt incorrectly.

Spell Check Dialog

As you can see, there are a number of options available to deal with the incorrectly spelt word. We shall outline each one below, and discuss how each affects the usability of the spell checking feature.

Firstly, we can see that the word that has been found is displayed at the top. This gives us the ability to see the incorrectly spelt word.

Next, is an area where we can manually edit the word. This may contain a different word to that shown above, if there was a reasonable replacement. This will usually be the first word shown in the suggestions list below. You may elect to use the buttons to the right, or edit the word to correct it as you see fit.

As mentioned above, the next area is a list where any potential suggestions for replacements of the incorrect word will be shown. You may select any of the words in this list, and that word will be inserted into the replace box automatically.
The best match is usually shown at the top, and the list is sorted so that more vague replacements are further down the list. The algorithm used to determine these matches is based on the "Levenshtein Distance" algorithm. More information on this is available from Wikipedia.

So, now we have the incorrect word, and possibly have a good replacement, what can we do next?

The options available are listed below, and are as follows:

  • Add to user list
    CodeBench actually maintains two wordlists. The main one, is the one you downloaded and contains the majority of the words to check against. It also maintains a "user wordlist" where words that are not found in the main wordlist can be added to. This means that any further occurrences of the word will not be found to be incorrect. This can be helpful with words you may use a lot that are not normally present in the spoken language of your choice.
    Words added to this list will be treated as a correct word just like words present in the main list.

  • Replace
    As the button suggests, this option will replace the incorrect word in the editor with the word in the box above. This word can be one which has been manually edited, or selected from the list of possible suggestions.

  • Ignore
    As the name implies, this option will ignore the incorrectly spelt word in the editor. The word is skipped over, and the check resumes after it. If any further occurrences of this word are found, you will be notified by the spell check feature.

  • Replace All
    Like the Replace button, this option will replace the current occurrence of the incorrect word in the editor. The spell checker will then continue throughout the entire document and replace any further occurrences of the word with the one supplied.

  • Ignore All
    Like the Ignore button, this option will skip over the current occurrence of the incorrect word and continue checking the text after it. It will also save the word in an internal list so that any further occurrences are also ignored. This list is maintained only for this session, and it will be purged once a new check of the spelling has been started. To ignore words permanently, you should add the word to the user list with the above option.

  • Check Again
    This will start a new session, and check the entire document from the top of the text. Any previously ignored words will be alerted again.


back to the top

Valid XHTML 1.0 Transitional This is a W3C checked and compliant webpage.