# Allow grammar rules and rule categories list for on-premise clients

This is the opposite of the [disabledRules](https://docs.wproofreader.com/v6.12.0/deployment/configuration/grammar-check-engine-setup/pages/8q4oSjwlBmCmHHdpZm1q#styleguidefunctionalityv.1-or-release5.29.0.0-1.3.disablingspecificrulesorrulescategoriesforcloudand) feature which gives the opportunity to the **on-premise** clients to define rules and/or their categories that should be exclusively used while proofreading. It doesn't have API analog or option for the Cloud clients.

For example, you may want to use only the punctuation category of [LanguageTool rules](https://community.languagetool.org/rule/list?lang=en) along with AI-based or specific style guide categories. So, it will be much easier for you to have a place where you can indicate only one category of rules that should be enabled instead of specifying the huge list of rules that should be disabled.

The prioritization of applying features of allowing and [disabling ](https://docs.wproofreader.com/v6.12.0/deployment/configuration/grammar-check-engine-setup/pages/8q4oSjwlBmCmHHdpZm1q#styleguidefunctionalityv.1-or-release5.29.0.0-1.3.disablingspecificrulesorrulescategoriesforcloudand)some rules and their categories is the following: enabled rules excluding disabled rules. For example, we allowed rules #1 - 3 and disable rule#2. This means that only rule #1 and rule #3 will work for your end-users.

### How to enable specific rules and their categories?

**UseAllowedRulesFile** tag is disabled by default and is not showing in the AppServerX.xml file.

Starting the WebSpellChecker on-premise version 5.31.0.0, you can manage the state of the UseAllowedRulesFile following the steps below:

1. Locate and open the **AppServerX.xml** configuration file for editing. By default, the file is located in \<Installation\_Path>/AppServer/AppServerX.xml.
2. Before making any changes to the AppServerX.xml file, it is recommended to [stop AppServer](https://docs.webspellchecker.net/display/WebSpellCheckerServer55x/Main+AppServer+Commands#MainAppServerCommands-stopAppServerWindowsLinux2.StopAppServer).
3. Find a block with the needed [language](/v6.12.0/features/supported-languages.md) by its name or shortcode. For example, American English (Locale="en-US").
4. Insert the **UseAllowedRules** tag with the **true** value in the relevant section of the AppServerX.xml file for the LanguageTool or StyleGuide section, matching the language setting.

```javascript
<LanguageTool Enabled="true" Priority="0" Locale="en-US">
 <UseAllowedRules>true</UseAllowedRules>
</LanguageTool>
```

5. Navigate to the **allowedRules.json** file and open it for editing. By default, the file is located in \<Installation\_Path>/AppServer/ directory.

{% hint style="info" %}
There is one single allowedRules.json file for allowing LanguageTool and StyleGuide rules and their categories. However, you have to enable the UseAllowedRules tag for the appropriate section in the AppServerX.xml file separately for LanguageTool and StyleGuide or in two if needed.
{% endhint %}

6. Make changes in the file to allow the specific grammar rules and rule categories list following the default examples in the allowedRules.json file.
7. Save the updated version of the **AppServerX.xml** file and [start AppServer](https://docs.webspellchecker.net/display/WebSpellCheckerServer55x/Main+AppServer+commands#MainAppServercommands-startAppServerWindowsLinux1.StartAppServer) to apply changes.

{% hint style="info" %}
Future updates to the allowedRules.json file don't require the WebSpellChecker AppServer to restart once activated for the specific language.
{% endhint %}

{% hint style="info" %}
If you run WebSpellChecker on Docker, you can [create an updated image from a modified Docker container](https://github.com/WebSpellChecker/wproofreader-docker) to use it further.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wproofreader.com/v6.12.0/deployment/configuration/grammar-check-engine-setup/allow-grammar-rules-and-rule-categories-list-for-on-premise-clients.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
