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

Add fasttext to README.md #70

Open
ai opened this issue Mar 20, 2023 · 4 comments
Open

Add fasttext to README.md #70

ai opened this issue Mar 20, 2023 · 4 comments

Comments

@ai
Copy link

ai commented Mar 20, 2023

Some LanguageTool guides recommend adding fasttext to system and set fasttextModel/fasttextBinary settings.

Does it really useful?

Should we add a guide? Or maybe add at least fasttext binary to Docker image?

@teapot9
Copy link

teapot9 commented Sep 11, 2023

fasttext is now available in the Alpine edge branch. This means it will probably be available in the next stable release, and we will be able to directly install it with apk add fasttext.

Until then, we would have to build it from source, maybe using the alpine's APKBUILD.

The user would have to set the variables langtool_fasttextBinary=/usr/bin/fasttext and langtool_fasttextModel=/fasttext.bin, and mount the model as a volume with -v /path/to/model.bin:/fasttext.bin:ro.

@Joelius300
Copy link

Any updates on this?

@ovizii
Copy link

ovizii commented Feb 16, 2024

I'm also interested in this, any progress?

@Turab
Copy link

Turab commented Nov 13, 2024

If anyone needs fasttext in Language tool, just build your own image and use ENV vars @teapot9 posted.

Here is the instructions;

1- Create a new image with fasttext using a dockerfile with this content:

# Change the version per your wish
FROM erikvl87/languagetool:6.5
USER root
RUN apk add fasttext
USER languagetool

If you are using Caprover, deploy this new image by just copying and pasting this content on deploy tab method 4.

2- Build the image with something like docker build -t languagetoolwithfasttext:6.5 . (Not needed if using Caprover or something similar.)

3- Add /path/to/model.bin as a volume. (Or just the path, not the file.)

4- Run the container with this new image.

5- Enter to container command prompt and download model file to /path/to/model.bin from here. (Or copy from host to container if you already have it.)

6- Stop the container and re-run it with these env vars:

langtool_fasttextBinary=/usr/bin/fasttext
langtool_fasttextModel=/path/to/model.bin

Note: You shouldn't be using these ENV vars before you have the model file in place or the container will keep restarting complaining that the file doesn't exist.

You should be having fasttext support in Language Tool now. If you want to make sure, you can check the logs if it says it loaded the model for fasttext.

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

No branches or pull requests

5 participants