LanguageTool Docker

Currently reading
LanguageTool Docker

Telos

Subscriber
3,788
1,297
NAS
DS4l8play, DS202j, DS3623xs+, DSM 7.3.3-25847
Just wanted to call attention to a resource by one our contributors @Dr_Frankenstein ...

LanguageTool provides a browser spell check feature, as well as some grammar checks, and offers a synonym feature. But rather than share all your post content with that organization, you can run the tool on your NAS.

I found his post, easy to follow. The only modification I made was to drop the network host mode. FWIW, my docker-compose file follows...

Code:
version: "3.8"
services:
  languagetool:
    image: erikvl87/languagetool:latest
    container_name: languagetool
    # network_mode: host
    ports:
        - 8010:8010
    environment:
        - langtool_languageModel=/ngrams
        - Java_Xms=512m
        - Java_Xmx=1g
    volumes:
        - /volume1/docker/languagetool/ngrams:/ngrams
restart: unless-stopped
 
How do you enable it in your browser once it's started? I'm using Chrome.
 
That's described in the blog post I linked in #1 post.
Thanks...navigation to his website wasn't clear to me, initially I clicked in the link and it took me to his "Latest Activity" page here on this site. After your comment I poked about a little more and found that it was just a hover on the link and the dialog w/the link to his website popped up. Learn something new every day, right?! :)

1646408390802.png
 
Wrong link. Click the link associated with the word "post".

5QeRHuM.png
Wow...never saw that link...on my screen the "post" link just blends too well w/the text near it so I didn't see it, the link highlighting is too weak. The older my eyes get, the more they toy with me... ;-)
 
Hello, just tried setting it up, I received this error in my logs. Any ideas how to fix it? Running 6.2.3

Error: Internal Error: java.lang.RuntimeException: org.apache.lucene.index.CorruptIndexException: checksum failed (hardware problem?) : expected=1cd4a2d4 actual=c26f8237 (resource=BufferedChecksumIndexInput(MMapIndexInp
 
Hello, just tried setting it up, I received this error in my logs. Any ideas how to fix it? Running 6.2.3

Error: Internal Error: java.lang.RuntimeException: org.apache.lucene.index.CorruptIndexException: checksum failed (hardware problem?) : expected=1cd4a2d4 actual=c26f8237 (resource=BufferedChecksumIndexInput(MMapIndexInp
Just a quick update, I tried installing version 4.9.1 and that worked fine - no more errors.
 
Hey, it looks like there is an issue with the latest version

You should be able to roll to the version suggested. It seems to only affect people setting up for the first time as running 5.7 OK from an upgrade.
 
Last edited:
Recently, I've had occasions where the underlined "misspellings" reveal "corrections" that may be in French, or sometimes Italian (despite English as the chosen language).

It happens only briefly, and then reverts to the correct language.

I reached out to the LanguageTool folks, and their reply was to the effect...

It seems you are using your own LanguageTool server.
Make sure to configure “FastText” to improve language detection.
If you google for “LanguageTool FastText” you will find plenty of resources describing how to set it up.


Overall, I found this vague and unhelpful.

Has anyone experienced this?
 
Recently, I've had occasions where the underlines "misspellings" reveal "corrections" that may be in French, or sometimes Italian (despite English as the chosen language).

It happens only briefly, and then reverts to the correct language.

I reached out to the LanguageTool folks, and their reply was to the effect...

It seems you are using your own LanguageTool server.
Make sure to configure “FastText” to improve language detection.
If you google for “LanguageTool FastText” you will find plenty of resources describing how to set it up.


Overall, I found this vague and unhelpful.

Has anyone experienced this?
Hey, so their instructions were to Google it lol, I have had this same issue with random languages coming up on what to me was clearly English.

So I just did a bit of Googling I think these are the first steps – just trying them now… but calling it a night shortly so will be trying more tomorrow!

Go here

Follow the instructions for building the commandline version, I did this on a PopOS (Ubuntu) laptop which will generate a load of files you just need the 'fasttext' binary its about 428kb (I can share this if you need it)

Then grab the language identification binary from here Language identification · fastText the 126mb version.

Next steps are currently unclear....BBL
 
From what I understand, the fasttext binary and model need to be mapped into the container as volume and configured in the configuration file like this:

Code:
fasttextModel=/mount/path/in/container/lid.176.bin
fasttextBinary=/mount/path/in/container/fastText

I could try to build a custom image with the preinstalled fasttext binary based on erikvl87/languagetool and publish it on dockerhub. It should be easy to add environment variables to define which language packs to be downloaded and wether fasttext should be enabled or not.
 
Wondering what the point of this is...
JDmHA2W.png


Or, is that not implemented in the Docker image.
 
I have no idea. Does it allow to install the ngrams? I haven't used languagetool yet, I just stumbled accross Language Tool and though, it can't be that hard to extend the existing image to support fasttest.

if it was not directed to me, just ignore this post :)
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

To be precise the container needs bash (most only provide /bin/sh instead of /bin/bash). SSH is not...
Replies
2
Views
334
Use bind volumes, and the CM Project feature. Hyper Backup can then backup the volumes, and with a copy of...
Replies
2
Views
299
Those are two different layers: one is the management ui to perform actions on the api. the other is the...
Replies
12
Views
533
Thanks for your replies, but I found the solution: I had to allow port 8083 in the firewall.
Replies
5
Views
484
Thank you for this - I'll give it a go and see where I get - worst case I learn something as I go!
Replies
6
Views
580
I have no idea what you are doing, but I just tested it based on the instructions of the guide you linked...
Replies
11
Views
1,352
Of course you can, and indeed as @Rusty already advised Gluetun is the way to go. I use it without issues...
Replies
5
Views
671

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Trending threads

Back
Top