Open milekpl opened 10 years ago
http://stackoverflow.com/questions/26003377/how-to-add-two-word-patterns-to-be-ignored-by-languagetool has a workaround and an extended request
I had a similar idea in this forum post: http://forum.languagetool.org/t/can-i-put-my-configuration-into-seperate-files/1269/3
This shouldn't only work for ignore.txt
, but for all important configuration files for all languages. At least for the command line tool/server it could work like this:
--user-config-dir <DIR>
org/languagetool/rules/de/grammar.xml
), it also reads the same file from --user-config-dir
(so in this case $USER_CONFIG_DIR/org/languagetool/rules/de/grammar.xml
) and merges the upstream config with the user config.You could then invoke the command line tool/server e.g. with --user-config-dir ~/.config/languagetool
, and it would then add your custom configuration to the upstream configuration.
I was thinking: this could be useful for 'in-universe' terminology.
I actually have an old, on-hiatus projects where I was writing LanguageTool definitions for grammar mistakes like "wooded leg" and "plasma leek" that I see on Fanfiction.net.
https://github.com/ssokolow/languagetool-fanfiction
This would be very helpful for applying that.
I've hacked together a small shell script that reads user configuration from /etc/LanguageTool
and applies them to a LanguageTool installation located in /opt/LanguageTool
. Currently it can apply patches (to hook into the XML files, or to apply bug fixes) and merge text files. It's all pretty much hardcoded for my requirements and only deals with de
rules, but it should be possible to adapt and extend it for other purposes.
languagetool-user-config.tar.gz
It should be possible to add words to the dictionary stored in the same directory where the configuration resides (i.e., user home directory). The words would be add to ignored words when initalizing LT, also in the command-line mode. The file should be a simple text file, just like ignore.txt, and the same reading routine can be used.