language_tool_python
language_tool_python copied to clipboard
Use system version of languagetool if available
Arch Linux provides a bash script /usr/bin/languagetool
that is a simple wrapper and the jar binaries. Would be great if the library could be made to use the system version if applicable instead of downloading it and bloating the home directory.
You can try to set your environment variable LTP_PATH
to that path and try if it works.
Disclaimer: I did not check if this works on Arch or not but I do a similar thing on Windows pointing to a folder where I pre-downloaded Language Tools into.
More information: https://github.com/jxmorris12/language_tool_python#customizing-download-url-or-path
@ravendinata It looks like it will download the LanguageTool zip anyway even if LTP_PATH
env var is defined.
https://github.com/jxmorris12/language_tool_python/blob/6246cdf8a5b89496b027036eb9bb20cc0f41314e/language_tool_python/server.py#L246C1-L249C19
https://github.com/jxmorris12/language_tool_python/blob/6246cdf8a5b89496b027036eb9bb20cc0f41314e/language_tool_python/download_lt.py#L131C1-L151C1