There are three possible scenarios for adding Hunspell dictionaries to the
Oxygen XML Author Eclipse 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:
- Download the files needed for your dictionary. You will need a dictionary file
(with a .dic file extension) and an affix file (with the
.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 for the language code, followed by an underscore or hyphen, then two letters
that indicate the country code, followed by another 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 for a less specific English medical dictionary,
you could omit the country code like this:
en_medical.dic). For a list of
language codes, see
https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes.
- Open the
Preferences dialog box and go to
.
- Choose one of the following two options for adding the downloaded files.
- Copy both files (.dic and .aff) to the
default directory displayed in the Dictionaries and term lists default folder
option.
- Copy both files (.dic and .aff) to any
other directory, select the Include dictionaries and term list from option,
and select that directory. If you choose this option, make sure you read this important note.
- 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:
- Create a dictionary file (with a .dic file extension) and
an affix file (with the .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 for the language code, followed by an underscore or hyphen, then two letters
that indicate the country code, followed by another 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 for a less specific English medical dictionary,
you could omit the country code like this:
en_medical.dic). For a list of
language codes, see
https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes.
- 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
Tip: Words stored in dictionaries are not handled as case-sensitive. Therefore,
you do not need to include both uppercase and lowercase versions of the
words.
Note: If you save the
.dic file using UTF-8
encoding, then the corresponding
.aff file should specify the
encoding as a property inside it (if you do not specify the encoding, the default
platform encoding will be
used):
SET UTF-8
- Open the
Preferences dialog box and go to
.
- Choose one of the following two options for saving the files.
- Save both files (.dic and .aff) to the
default directory displayed in the Dictionaries and term lists default folder
option.
- Save both files (.dic and .aff) to any
other directory, select the Include dictionaries and term list from option,
and select that directory. If you choose this option, make sure you read this important note.
- 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:
-
Create your Hunspell dictionary. For more information on how to do this, see: Editing the Spell Checking Dictionaries.
Step 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 for the language code, followed by an underscore or hyphen, then two letters
that indicate the country code, followed by another 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 for a less specific English medical dictionary,
you could omit the country code like this:
en_medical.dic). For a list of
language codes, see
https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes.
- Open the
Preferences dialog box and go to
.
- Choose one of the following two options for saving the files.
- Save both files (.dic and .aff) to the
default directory displayed in the Dictionaries and term lists default folder
option.
- Save both files (.dic and .aff) to any
other directory, select the Include dictionaries and term list from option,
and select that directory. If you choose this option, make sure you read this important note.
- Restart the application for the spell checker to start using the new dictionary.