> For the complete documentation index, see [llms.txt](https://docs.wproofreader.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wproofreader.com/v6.12.0/deployment/configuration/spell-check-engine/excluding-words-from-the-language-dictionary.md).

# 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:

```xml
<!-- 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](/v6.12.0/deployment/configuration/application-server/appserver-parameters.md#resourcesdir).

### 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):

```xml
<Dictionary Path="en/en_US_excluded_words.txt" ForExclude="true"/>
```

Example (exclude from suggestions only):

```xml
<Dictionary Path="en/en_excluded_suggestions.txt" ForSuggestionsExclude="true"/>
```

6. Save the file.
7. Restart the application

Restart AppServer to apply changes in `AppServerX.xml`.

To restart: [stop](https://docs.wproofreader.com/v6.12.0/deployment/configuration/spell-check-engine/pages/IA2KNQLXDh85TwDivL4y#mainappservercommands-stopappserverwindowslinux2.stopappserver) the application, then [start](https://docs.wproofreader.com/v6.12.0/deployment/configuration/spell-check-engine/pages/IA2KNQLXDh85TwDivL4y#mainappservercommands-startappserverwindowslinux1.startappserver) it again.

Use [Main AppServer commands](/v6.12.0/deployment/configuration/application-server/main-appserver-commands.md).

### Full example (language tag with both dictionary types)

<details>

<summary>Show example</summary>

```xml
<Language Id="en_US" Enabled="true">
	<!-- American English (United States) -->
	<Alias>en</Alias>
	<Alias>am</Alias>
	<SupportedCheckKits>
		<CheckKit Name="lt_hs">
			<StyleGuide Enabled="true" Priority="4" Locale="en"/>
			<LanguageTool Enabled="true" Priority="0" Locale="en-US"/>
			<Hunspell Enabled="true" Priority="1" Locale="en_US">
				<Dictionary Path="en/en_US_medical.dic"/>
				<Dictionary Path="en/en_US_legal.txt"/>
				<Dictionary Path="en/en_US_added_words.txt"/>
				<Dictionary Path="en/en_ai_added_words.txt"/>
				<Dictionary Path="en/en_US_excluded_words.txt" ForExclude="true"/>
				<Dictionary Path="en/en_excluded_suggestions.txt" ForSuggestionsExclude="true"/>
				<Dictionary Path="en/en_excluded_offensive_language.txt" ForSuggestionsExclude="true"/>
				<Dictionary Path="en/en_excluded_nonexistent.txt" ForSuggestionsExclude="true"/>
				<Dictionary Path="common/common_abbreviations.txt"/>
				<Dictionary Path="common/common_proper_names.txt"/>
				<Dictionary Path="common/common_excluded_words.txt" ForExclude="true"/>
				<Dictionary Path="common/common_excluded_suggestions.txt" ForSuggestionsExclude="true"/>
				<SplitSugsRules Enabled="true" Path="en/en_split_sugs_rules.csv"/>
				<NERModel Enabled="true" Path="en/ner_model_en.dat" ProbabilityThreshold="0.5"/>
				<NgramPrioritization Enabled="true" Path="en/en_ngram_model.bin"/>
			</Hunspell>
			<Dialects Enabled="true" Priority="2" Locale="en_US" Path="en/en_US_GB_CA_AU_dialect.csv"/>
		</CheckKit>
		<CheckKit Name="ai_lt_hs1" Default="true" Enabled="true" Parent="lt_hs">
			<Neural Enabled="true" Priority="3" Locale="en"/>
			<LanguageTool Enabled="true" Priority="2"/>
			<Hunspell Enabled="true" Priority="0">
				<Dictionary Path="en/en_US_medical.dic" AllowAISubstitution="false"/>
				<Dictionary Path="en/en_ai_added_words.txt" AllowAISubstitution="false"/>
			</Hunspell>
			<Dialects Priority="1"/>
		</CheckKit>
		<CheckKit Name="ai_lt_hs0" Enabled="false" Parent="ai_lt_hs1">
			<Hunspell>
				<DisableSuggestions>true</DisableSuggestions>
			</Hunspell>
		</CheckKit>
		<CheckKit Name="ai_lt" Enabled="true" Parent="ai_lt_hs1">
			<Hunspell Enabled="true"/>
		</CheckKit>
		<CheckKit Name="ai" Enabled="true" Parent="ai_lt_hs1">
			<LanguageTool Enabled="false"/>
			<Hunspell Enabled="false"/>
		</CheckKit>
	</SupportedCheckKits>
	<DisabledRules Path="en/en_disabled_rules.json"/>
	<DisabledRules Path="en/en_US_disabled_rules.json"/>
	<Autocomplete Enabled="true">
		<Locale>en</Locale>
	</Autocomplete>
	<SuggestionPrioritization Enabled="true">
		<ConfigFile Path="en/en_US_suggestion_rules.ini" AdvancedSearch="true"/>
		<ConfigFile Path="common/common_suggestion_rules.ini" AdvancedSearch="true"/>
	</SuggestionPrioritization>
	<Autocorrect Enabled="true">
		<Dictionary Path="en/en_US_autocorrect.csv"/>
	</Autocorrect>
</Language>
```

</details>

### How to add words to an excluded dictionary

#### **Case-sensitive exclusion (exclude only one exact form)**

Add an exclamation mark (**!**) before the word. This means **only that exact spelling and case** will be treated as incorrect.

`!example`

Result:

* ❌ example → incorrect
* ✅ Example → correct
* ✅ EXAMPLE → correct
* ✅ eXamPle → correct

If you want to exclude other case versions as well, add them separately:

`!Example`

`!EXAMPLE`

`!eXamPle`

Each one will block only that exact version.

#### **Not case-sensitive exclusion**

Add the word **without an exclamation mark** (**!**). The system will automatically exclude additional case versions depending on the form you add.

**What gets excluded automatically?**

**If you add:**

`example`

Automatically treated as incorrect:

* ❌ example
* ❌ Example
* ❌ EXAMPLE

Mixed case (e.g., eXamPle) isn't automatically excluded.

**If you add:**

`Example`

(starting with a capital letter)

Automatically treated as incorrect:

* ❌ Example
* ❌ EXAMPLE

Lowercase example isn't automatically excluded.

**If you add:**

`EXAMPLE`

(all caps)

Automatically treated as incorrect:

* ❌ EXAMPLE

Other forms aren't automatically excluded.

**If you add:**

`eXamPle`

(mixed case)

Automatically treated as incorrect:

* ❌ eXamPle

Other forms aren't automatically excluded.

#### **Important – possessive forms ('s)**

If you exclude a word, its possessive form is automatically excluded too.

**If you add:**

`example`

Then the following are incorrect:

* ❌ example
* ❌ example’s

If you want to exclude only the possessive form, add it separately:

`example’s`

Result:

* ✅ example → correct
* ❌ example’s → incorrect
