Amaya

## Checking spelling

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 Tools 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 uses the user dictionary when checking 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 Tools / Check spelling command displays a dialog that enables you to choose parameters and interact with the spell checker.

- The top left field displays an incorrect word. 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 edited on there. The correction is made when you click the Replace and next button.
  Note that you can also 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 language, apply a `lang` attribute to the text with the Attributes tool, and restart the spell checker.
- 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: The incorrect word is 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 user's personal 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) and the checker searches for the next error.
- Close: Amaya closes the dialog box and stops spell checking. Previous corrections are not canceled.