Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement a user dictionary for GUI and commandline #65

Open
milekpl opened this issue Feb 16, 2014 · 5 comments
Open

implement a user dictionary for GUI and commandline #65

milekpl opened this issue Feb 16, 2014 · 5 comments

Comments

@milekpl
Copy link
Member

milekpl commented Feb 16, 2014

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.

@WolfgangFahl
Copy link

@martinvonwittich
Copy link

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:

  • add a new option, e.g. --user-config-dir <DIR>
  • for each data file LT reads (e.g. 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.
  • text files are merged simply by appending the user config to the upstream config
  • XML files are somehow properly merged

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.

@SkyCharger001
Copy link

I was thinking: this could be useful for 'in-universe' terminology.

@ssokolow
Copy link

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.

@martinvonwittich
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants