So I made some rules on the rule editor and I want to add them to grammar.xml so that the changes get reflected through the API as well.
I have a local branch setup for language tool. As mentioned in the guidelines( here , “Adding new XML rules”) , I made changes in the grammar.xml at the path: languagetool-language-modules/en/src/main/resources/org/languagetool/
I am trying to access this through the API. So, I had already build languagetool-standalone and started the service. After making the changes, I restarted the service and checked. The changes in the xml were not reflected while detecting the errors.
Do I need to rebuild the languagetool-standalone folder for the changes to be reflected? Or should I make changes to the grammar.xml inside the target foler in languagetool-standalone (I tried this but even this didn’t work).
This is enough, nothing needs to be rebuilt. You don’t even need the source code. Just download the ZIP (“stand-alone for your desktop”), edit ./org/languagetool/rules/en/grammar.xml, restart LT and you should see the new rules.
I restarted the api and checked a couple of errors which were generally marked by language tool. Now, it didn’t catch those, but it is still catching errors like whitespace errors, spelling mistakes etc.
I checked if there are any other grammar xmls in the folder. I found the following: