## Spell checking

Amaya provides a multilingual spell checker. This tool is invoked by the Spell Check command from the Edit menu. It uses the `LANG` attribute to select the right dictionary. You can associate this attribute with any element in a document, even with a single word. Use the Language command in the Attributes menu for that purpose.

When the user wants to register a new word, the spell checker creates or updates the "user's personal dictionary". By default, the "user's personal dictionary" is $HOME/.thot.DIC, but the user can define another file. Before starting Amaya, the user must set the `parameter "EXTENDDICT="` in the registry file ($HOME/.thotrc file) to change the default name . Thus, the checker will use, in addition to the dictionary specific to the language, this dictionary (in read-write mode) to control all documents.This dictionary is created and automatically updated by the spelling checker when the commands ``Skip (+dic)'' and ``Replace (+dic)'' are issued (see below).

The Spell Check command in Edit menu displays a form which enables you to choose the correction parameters and to interact with the checker:

- The maximum number of proposals is specified in the Number of proposals area. This number can take any value between 1 and 10, the default value is 3. Once an error has been detected, any change made to this value immediately displays a new list of proposals.
- Several buttons in Ignore submenu allow you to ignore certain words: for example words that contain capital letters, digits, Roman numerals or special characters indicated in the list below. This list can be modified by the user.
- The Checking submenu, similar to that in the Search form, allows you to specify the part of document on which the checker will work.
- The erroneous word is displayed in the area Spell checking.... The list of proposals is displayed in the selector located below the incorrect word. By default, the first proposal of correction is selected. To select another proposal, simply click on it. The selected proposal is displayed below the selector. This proposal can be directly modified in the form. The correction is made once you have clicked on one of the buttons Replace and next or Replace (+dic).
- The language in which the correction is made is specified in the top left corner of the form. To change the language, just apply an attribute Language to the text concerned by using the Attributes menu and restart the correction procedure.

To start the correction, click on the Skip and next button bottom of the form. If an error has been found, the incorrect word is selected and highlighted in the document. If no error has been detected, the "Not found" message is displayed in the bottom right corner of the form.

The user can then use one of the buttons placed at the bottom of the form to perform one of the following operations:

- Done: the form disappears and checking is aborted. Previous corrections are not canceled.
- Skip and next: the word considered incorrect is acceptable. No change is made in the text nor in the dictionaries. The checker searches for the next error.
- Skip (+dic): it is the same as ``Skip and next'' but the word considered incorrect is added to the spelling dictionary specific to the document, thus the checker will ignore any subsequent occurrence of this word.
- Replace and next: the word considered as erroneous is replaced by the correct word (changed or modified by the user, see above) and the checker searches for the next error.

- Replace (+dic): it is the same as.Replace and next: except that the replacement word is added to the document dictionary.