Adding Spell Check Dictionaries

There are three possible scenarios for adding Hunspell dictionaries to the Oxygen XML Developer plugin spell checker:

  • You can download a pre-built Hunspell dictionary and add it to the spell checking mechanism.
  • You can create a custom Hunspell dictionary file that defines your own list of words and add it to the spell checking mechanism.
  • You can build your own full Hunspell dictionary and add it to the spell checking mechanism.

Download and Add a Pre-Built Hunspell Dictionary

To add a downloaded pre-built dictionary, follow these steps:

  1. Download the files needed for your dictionary. You will need a dictionary file (with a .dic file extension) and an affix file (with an .aff file extension). If the dictionary does not include an affix file (.aff), you can create one and leave it empty, but it is needed for the mechanism to work properly. An example of a website that includes numerous dictionary files is: http://extensions.services.openoffice.org/dictionary.

    Important

    The name of the files should begin with a two letter prefix that indicates the language it should be attached to, followed by an underscore or hyphen, and then a descriptive name (for example, en_US_medical.dic for a medical dictionary in the US version of the English language or en_medical.dic for a less specific English medical dictionary). For a list of language codes, see https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes.
  2. Open the Preferences dialog box and go to EditorSpell CheckDictionaries.
  3. Choose one of the following two options for adding the downloaded files.
    1. Copy both files (.dic and .aff) to the default directory displayed in the Dictionaries and term lists default folder option.
    2. Copy both files (.dic and .aff) to any other directory, enable the Include dictionaries and term list from option, and select that directory. If you choose this option, make sure you read this important note.
  4. Restart the application for the spell checker to start using the new dictionary.

Create a Custom Hunspell Dictionary that Defines a List of Words

To create a custom Hunspell dictionary that defines your own list of words, follow these steps:

  1. Create a dictionary file (with a .dic file extension) and an affix file (with an .aff file extension). The affix file (.aff) can be left empty, but it is needed for the mechanism to work properly.

    Important

    The name of the files should begin with a two letter prefix that indicates the language it should be attached to, followed by an underscore or hyphen, and then a descriptive name (for example, en_US_medical.dic for a medical dictionary in the US version of the English language or en_medical.dic for a less specific English medical dictionary). For a list of language codes, see https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes.
  2. In the dictionary file (.dic extension), add the words you want to be included in your custom dictionary. Add one word per row and the first line needs to contain the number of words, as in the following example:
         2
         parabola
         asimptotic
  3. Open the Preferences dialog box and go to EditorSpell CheckDictionaries.
  4. Choose one of the following two options for saving the files.
    1. Save both files (.dic and .aff) to the default directory displayed in the Dictionaries and term lists default folder option.
    2. Save both files (.dic and .aff) to any other directory, enable the Include dictionaries and term list from option, and select that directory. If you choose this option, make sure you read this important note.
  5. Restart the application for the spell checker to start using the new dictionary.

Build and Add a Full Hunspell Dictionary

To build and add a full Hunspell dictionary, follow these steps:

  1. Follow these instructions: Building and Testing Hunspell Dictionaries.

    Result: You should end up with a dictionary file (with a .dic file extension) and an affix file (with an .aff file extension). The affix file (.aff) can be empty, but it is needed for the mechanism to work properly.

    Important

    The name of the files should begin with a two letter prefix that indicates the language it should be attached to, followed by an underscore or hyphen, and then a descriptive name (for example, en_US_medical.dic for a medical dictionary in the US version of the English language or en_medical.dic for a less specific English medical dictionary). For a list of language codes, see https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes.

  2. Open the Preferences dialog box and go to EditorSpell CheckDictionaries.
  3. Choose one of the following two options for saving the files.
    1. Save both files (.dic and .aff) to the default directory displayed in the Dictionaries and term lists default folder option.
    2. Save both files (.dic and .aff) to any other directory, enable the Include dictionaries and term list from option, and select that directory. If you choose this option, make sure you read this important note.
  4. Restart the application for the spell checker to start using the new dictionary.

Was this helpful?