Adding Additional Rules via XML #96
-
I was wondering if there is any way to add custom rules via XML to the bundled LanguageTool server? For instance, I might have an XML rule discouraging the use of "it is": <rule id="IT_IS" name="it is">
<pattern>
<token>it</token>
<token>is</token>
</pattern>
<message>Try avoiding "it is" if possible.</message>
</rule> This is possible when running a standalone LanguageTool server on localhost and adding the rules to |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
The LanguageTool HTTP interface does not support custom rules, see https://languagetool.org/http-api/swagger-ui/#!/default/post_check You have to open an issue or pull request at the LanguageTool repo first. Afterwards, we can implement the feature into LTeX+ As you correctly wrote, you can use a standalone LanguageTool server instead of the bundled LanguageTool if you want to use custom rules. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the quick response @spitzerd! If anyone finds this topic in the future, here is a guide on how you can make LTeX(+) work with custom grammar rules. Use LanguageTool with Custom RulesThe following guide is based on pl-lt-rules but has beed adapted to work with the latest LanguageTool version (6.5). 1. Install LanguageToolSee: Official Guide. On macOS: brew install languagetool 2. Get the path to the
|
Beta Was this translation helpful? Give feedback.
The LanguageTool HTTP interface does not support custom rules, see https://languagetool.org/http-api/swagger-ui/#!/default/post_check
According to my knowledge, same is true for the Java interface.
You have to open an issue or pull request at the LanguageTool repo first. Afterwards, we can implement the feature into LTeX+
As you correctly wrote, you can use a standalone LanguageTool server instead of the bundled LanguageTool if you want to use custom rules.