I’m not very happy though about the fact that my modifications are now mixed with the upstream data; this’ll get very messy when I have to upgrade to the next LanguageTool version. Is there a way to store my own modifications in separate files that won’t be overwritten when I update?
Not easily. If you use LT via its API, you could extend some classes and make sure they use your files additionally to the standard ones. With using LT as a (e.g. command-line) tool, all I can think of is using entities in the XML files, as documented at Tips and Tricks - LanguageTool Wiki. This way, the modification of the original file is kept to a minimum.
Not easily. If you use LT via its API, you could extend some classes and make sure they use your files additionally to the standard ones.
Hmm, at the moment I’m using languagetool-server.jar because I’m not very familiar with Java. I’m thinking a new parameter like --user-config-dir would be nice, so you could start it like this:
And then for each data file that LT reads from it’s own directory (e.g. ~/LanguageTool-3.5/org/languagetool/rules/de/grammar.xml), it should also read an additional file from the user configuration directory (e.g. ~/ltconfig/org/languagetool/rules/de/grammar.xml) and add the rules/strings from this additional file to the ones it has read from it’s own file. Should I file a feature request for this in github?