Closed asnashafiq closed 7 months ago
I wonder if you have solved this problem? I've been trying to use a locally stored Language Tool as the local server so that my python scripts can run totally offline. But sadly I don't know how to configure it. I've tried to replace LTP_PATH with a path to my project but it didn't work.
I had the same issue. For me the following worked:
pip download the installation files on a device with internet connection. Then use these files on the device without internet connection to pip install the module (!pip install language_tool_python --no-index --find-links=file:///PATHTOINSTALLFILES).
To avoid that the python import of the module tries to download LanguageTool{version}.zip and put it in the cache of your device, you need to download the LanguageTool{version}.zip on another device with internet connection (from here https://languagetool.org/download/?C=S;O=D) and always (if cache gets deleted after usage) move these files in the cache of your offline device before importing the module. I used this command: !mv {unzipped folder which needs to be moved to cache} {path to your cache} inside my python script before the import function.
Hope that helps!
I'm having the same issue
I have tried your approach but I'm getting the same error as before. Could you please specify which cache I should move the files to? Is ist the directory of the language-tool library? Thats where I moved it.
Thanks!
I'm having the same issue
I have tried your approach but I'm getting the same error as before. Could you please specify which cache I should move the files to? Is ist the directory of the language-tool library? Thats where I moved it.
Thanks!
I downloaded LanguageTool{version}.zip and moved the unzipped folder to `~/.cache/language_tool_python/' and it worked. Hope that would help.
@pyagoubi it was the same path @Zhao-Qiao mentioned above.
@jxmorris12 it should be fixed now.
The user now can use LTP_JAR_DIR_PATH
as mentioned in the README to specify local installation and bypass the download for sure.
When using the local server, there is a download from a url for the language tool during initialization. Is it possible to add a local configuration that lets you use an already downloaded tool under
LTP_PATH
and bypass the download code? Wondering if there's a way to bypass the download from the url with 100% certainty.