Allow grammar rules and rule categories list for on-premise clients
This is the opposite of the disabledRules 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 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 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:
Locate and open the AppServerX.xml configuration file for editing. By default, the file is located in <Installation_Path>/AppServer/AppServerX.xml.
Before making any changes to the AppServerX.xml file, it is recommended to stop AppServer.
Find a block with the needed language by its name or shortcode. For example, American English (Locale="en-US").
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.
<LanguageTool Enabled="true" Priority="0" Locale="en-US">
<UseAllowedRules>true</UseAllowedRules>
</LanguageTool>Navigate to the allowedRules.json file and open it for editing. By default, the file is located in <Installation_Path>/AppServer/ directory.
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.
Make changes in the file to allow the specific grammar rules and rule categories list following the default examples in the allowedRules.json file.
Save the updated version of the AppServerX.xml file and start AppServer to apply changes.
Future updates to the allowedRules.json file don't require the WebSpellChecker AppServer to restart once activated for the specific language.
If you run WebSpellChecker on Docker, you can create an updated image from a modified Docker container to use it further.
Last updated
Was this helpful?