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 a word, 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. If a selected block contains more than one word, only the first word will be checked.

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





Spellcheck Settings window

There are various settings that you can use to tailor the spellcheck feature to suit your particular needs. We shall cover each option below:

  • Ignore all capitals
    When this option is enabled, any words found that are all in upper-case letters (capitals), they will be ignored completely.

  • Ignore single characters
    This option controls how single characters are treated. When enabled, single characters will be completely ignored.

  • Filter underscores
    This option can be useful when checking files used for locale translations, as it will ignore any underscores present in words found. So something like "under_score" becomes "underscore", and checked as such.

  • Ignore words with numbers
    As this option suggests, any words found which contain numbers will be completely ignored.

  • Ignore "Tags"
    Mainly of use when checking web pages, this option will ignore any words found that are enclosed in <> pairs.

  • Load the Wordlist at startup
    If the spellcheck feature is something you use frequently, you might want to enable this option.

    In order to speed things up when loading projects, the wordlist is only loaded when required (when starting a check, for example). With this option enabled, the wordlist will be loaded at startup ready for use when needed.

  • Accuracy level
    This value specifies how accurate the Spellchecker should be when offering suggestions to misspelled words. The higher the value, the higher the accuracy.

  • UserList
    This section gives the user a chance to remove words from the userlist, or to delete the userlist completely. By deleting it, any words that was in it will now be shown again as unrecognised words, so use this option with care.


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, without interaction.

  • 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 from here
    This will continue checking the document from the current cursor position. It will, however, start a new session and therefore any ignored words in the previous session are no longer ignored.

  • Check from top
    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.

The small icon under these buttons gives you a convenient way to open the spellcheck settings window.

back to the top

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