Sign inSign up

collabora/languagetool

By collabora

Updated about 1 year ago

LanguageTool’s multilingual grammar, style, and spell checker

Image
3

10K+

collabora/languagetool repository overview

Introduction

LanguageTool is an Open Source proof­reading software for English, French, German, Polish, and more than 20 other languages.

This Docker image is based on silviof/docker-languagetool to get LanguageTool running on a system without Java. It can be used together with collabora/code Docker image.

This image is free to use but limited and unsupported. Please check for supported options at https://languagetool.org/premium?a=collabora.

Usage

The Server is running on port 8010, this port should be exposed.

$ docker pull collabora/languagetool
[...]
$ docker run --rm -p 8010:8010 collabora/languagetool

Or you can run it in background via -d-option.

Run with no minimum rights and RAM

docker run --name languagetool \
                        --cap-drop=ALL \
                        --user=65534:65534 \
                        --read-only \
                        --mount type=bind,src=/tmp/languagetool/tmp,dst=/tmp \
                        -p 8010:8010 \
                        --memory 412m --memory-swap 500m \
                        -e EXTRAOPTIONS="-Xmx382M" \
                        collabora/languagetool:latest

Integration with collabora/code

LanguageTools support is off by default in collabora/code. To set it up, you need to pass two configuration options in the extra_params environment variable:

  • --o:languagetool.enabled=true
  • --o:languagetool.base_url=http://<IP address of your host>:8010/v2

For example:

docker run -i -t --name collabora_code \
    -p 9980:9980 -e "extra_params=--o:ssl.enable=false \
    --o:ssl.termination=false --o:languagetool.enabled=true \
    --o:languagetool.base_url=http://192.168.100.20:8010/v2" \
    --privileged collabora/code

ngram support

To support ngrams you need an additional volume or directory mounted to the /ngrams directory. For that add a -v to the docker run-command.

docker run ... -v /path/to/ngrams:/ngrams ...

Download English ngrams with the commands:

mkdir ngrams
wget https://languagetool.org/download/ngram-data/ngrams-en-20150817.zip
(cd ngrams && unzip ../ngrams-en-20150817.zip)
rm -f ngrams-en-20150817.zip

One can use them using web browser plugin "Local server (localhost)" setting by running:

docker run -d --name languagetool -p 8081:8010 -v `pwd`/ngrams:/ngrams:ro --restart=unless-stopped collabora/languagetool

Tag summary

Content type

Image

Digest

sha256:90664ec35

Size

478.6 MB

Last updated

about 1 year ago

docker pull collabora/languagetool