language_tool_python icon indicating copy to clipboard operation
language_tool_python copied to clipboard

Use system version of languagetool if available

Open bobbens opened this issue 1 year ago • 1 comments

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.

bobbens avatar Dec 09 '23 15:12 bobbens

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 avatar Jan 05 '24 03:01 ravendinata

@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

pidefrem avatar Apr 11 '24 09:04 pidefrem