Excluding words from the language dictionary

Use exclude dictionaries to fine-tune Hunspell behavior for a specific language.

You can exclude words in two different ways:

  • Exclude dictionary (ForExclude="true"). Words are treated as incorrect. They are underlined as misspellings. They also won’t appear in suggestions.

  • Exclude suggestions dictionary (ForSuggestionsExclude="true"). Words are treated as correct (not underlined). They also won’t appear in suggestions.

Dictionary files location

Default and additional Hunspell wordlists are stored under:

  • [WebSpellChecker_installation_folder]/AppServer/<ResourcesDir>/<lang_group>/

By default, ResourcesDir points to the Resources directory:

<!-- ResourcesDir parameter defines a path to the directory with dictionary resources. -->
<ResourcesDir>Resources</ResourcesDir>

<lang_group> is the top-level folder for a language group. Example: en, de, es.

All Dictionary Path="..." values are resolved relative to ResourcesDir.

Find ResourcesDir in AppServer parameters.

Add an exclude dictionary (example: English)

  1. Go to [WebSpellChecker_installation_folder]/AppServer/.

  2. Back up AppServerX.xml.

  3. Create a new UTF-8 text file in the language resources folder. Example: Resources/en/en_US_excluded_words.txt. Put one word per line (for example, mango).

  4. Open AppServerX.xml for editing.

  5. Find the target language, and add the dictionary entry under the needed <Hunspell> section.

Example (exclude words):

Example (exclude from suggestions only):

  1. Save the file.

  2. Restart the application

Restart AppServer to apply changes in AppServerX.xml.

To restart: stop the application, then start it again.

Use Main AppServer commands.

Full example (language tag with both dictionary types)

chevron-rightShow examplehashtag

Last updated

Was this helpful?