## Checking Spelling in Amaya

Amaya provides a multilingual spell checker, and selects the appropriate language according to the `lang` attribute. The `lang` attribute can be associated with any element in a document, even with a single word, using the Attributes tool.

To spell check a document, choose Check spelling from the Edit menu.

### The Personal Dictionary

When you register a new word, the spell checker creates or updates the user's personal dictionary. A user's personal dictionary is located in the `AmayaHome/dictionary.DCT` file. In read-write mode, the spell checker employs the user dictionary when reviewing all documents, in addition to the language-specific dictionaries. When you click the Learn button in the Spell checking dialog, the user dictionary is created, if does not already exists, and automatically updated by the spelling checker.

### The Spell Check Dialog

The Check spelling option on the Edit menu displays a dialog that enables you to choose parameters and interact with the spell checker. These parameters are defined below.

- The Spell Checking field displays incorrect words. The list of proposed corrections is displayed in the selector field located below the incorrect word. By default, Amaya selects the first proposed correction. To select another correction, simply click it. The selected correction is displayed below the selector field. This correction can be directly edited on the dialog. The correction is made when you click the Replace and next button.
  Note that you can perform the correction by double-clicking a proposed correction.
- The language in which the correction is made is specified in the bottom left corner of the dialog. To change the language, apply a `lang` attribute to the text with the Attributes tool, and restart the spell-check procedure.
- The Ignore section tells the spell checker to ignore certain words, for example, words that contain only capital letters, words that contain digits, Roman numerals or words with special characters (you can choose the special characters).
- The Checking section, similar to that in the Search dialog, enables you to specify the part of document on which the checker will work.

### Running the Spell Checker

Before running the spell checker, make sure the current selection is in the document you want to check. For the spell checker, the source code is different from the formatted document. If the current selection is in the source view, all the markup will be checked, including tags, attributes, etc. If the selection is in the formatted view, only the content of the document will be checked.

To start the checker, click the Search/Skip button at the bottom of the dialog. If an error is found, the incorrect word is selected and highlighted in the document. If no error was detected a message "End of spell checking" is displayed at the bottom of the dialog.

When an incorrect word is detected, you can use a button on the dialog to perform the following operations:

- Search/Skip: Amaya considers the incorrect word as acceptable. No change is made in the text or in the dictionaries. The checker searches for the next error.
- Learn: Performs the same action as the Search/Skip button, except that the word considered incorrect is added to the document dictionary, and the checker will ignore any subsequent occurrence of this word.
- Replace and next: Amaya replaces the incorrect word with the correct word (optionally edited by the user) and the checker searches for the next error.
- Close: Amaya closes the dialog and stops spell checking. Previous corrections are not canceled.