aboutsummaryrefslogtreecommitdiff
path: root/readme.md
diff options
context:
space:
mode:
authorChristian Segundo2022-03-07 20:58:31 +0100
committerChristian Segundo2022-03-07 20:58:31 +0100
commit66ae9ab6eb3751ae7507156e696e3215cab0a496 (patch)
tree4b9a9cb190a725a15f62446dfd6aea84012ae59c /readme.md
parentc3b760f58b1b548a2435fda1f52dbaa26b190a88 (diff)
downloadlanguagetool-66ae9ab6eb3751ae7507156e696e3215cab0a496.tar.gz
Full refactor
Diffstat (limited to 'readme.md')
-rw-r--r--readme.md52
1 files changed, 27 insertions, 25 deletions
diff --git a/readme.md b/readme.md
index 843159f..60885f0 100644
--- a/readme.md
+++ b/readme.md
@@ -1,59 +1,61 @@
+[![Publish](https://github.com/someone-stole-my-name/docker-languagetool/actions/workflows/main.yml/badge.svg?branch=master)](https://github.com/someone-stole-my-name/docker-languagetool/actions/workflows/main.yml) [![Test](https://github.com/someone-stole-my-name/docker-languagetool/actions/workflows/test.yml/badge.svg)](https://github.com/someone-stole-my-name/docker-languagetool/actions/workflows/test.yml) [![trivy](https://github.com/someone-stole-my-name/docker-languagetool/actions/workflows/trivy.yml/badge.svg?branch=master)](https://github.com/someone-stole-my-name/docker-languagetool/actions/workflows/trivy.yml)
# Introduction
[LanguageTool] is an Open Source proof­reading software for English, French,
German, Polish, and more than 20 other languages.
-You can use the LanguageTools with a [firefox-plugin].
+You can use LanguageTool with a [Firefox extension].
-This is a Dockerfile to get the languagetools running on a system without java.
+This is a container to get the LanguageTool running on a system without java.
[LanguageTool]: https://www.languagetool.org/
-[firefox-plugin]: https://addons.mozilla.org/firefox/addon/languagetool
+[Firefox extension]: https://addons.mozilla.org/firefox/addon/languagetool
# Usage
The Server is running on port 8010, this port should exposed.
- $ docker pull silviof/docker-languagetool
+ docker pull ghcr.io/someone-stole-my-name/docker-languagetool
[...]
- $ docker run --rm -p 8010:8010 silviof/docker-languagetool
+ docker run --rm -p 8010:8010 ghcr.io/someone-stole-my-name/docker-languagetool
-Or you run it in background via `-d`-option.
+Or you 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 127.0.0.1:8010:8010 \
- --memory 412m --memory-swap 500m \
- -e EXTRAOPTIONS="-Xmx382M" \
- silviof/docker-languagetool:latest
-```
+
+ docker run --name languagetool \
+ --cap-drop=ALL \
+ --user=65534:65534 \
+ --read-only \
+ --mount type=bind,src=/tmp/languagetool/tmp,dst=/tmp \
+ -p 127.0.0.1:8010:8010 \
+ --memory 412m --memory-swap 500m \
+ -e JAVAOPTIONS="-Xmx382M" \
+ ghcr.io/someone-stole-my-name/docker-languagetool:latest
+
Route information can be found at https://languagetool.org/http-api/swagger-ui/#/default, an easy route to test that it's running is `/v2/languages`.
## 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.
+`/ngrams` directory. For that add a `-v` to the `docker run` command.
- docker run ... -v /path/to/ngrams:/ngrams ...
+ docker run ... -v /foo:/ngrams ...
[ngrams]: http://wiki.languagetool.org/finding-errors-using-n-gram-data
-
+### Manual
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
+ wget https://languagetool.org/download/ngram-data/ngrams-en-YYYYMMDD.zip
+ (cd ngrams && unzip ../ngrams-en-YYYYMMDD.zip)
+ rm -f ngrams-en-YYYYMMDD.zip
+### Automatically
-One can use them using web browser plugin "Local server (localhost)" setting by running:
+Mount a directory or volume to `/ngrams` and use the `NGRAM_LANGUAGES` variable to pass a comma separated string with languages:
- docker run -d --name languagetool -p 127.0.0.1:8081:8010 -v `pwd`/ngrams:/ngrams:ro --restart=unless-stopped silviof/docker-languagetool
+ docker run ... -v /path/to/ngrams:/ngrams -e NGRAM_LANGUAGES="en,es" ...