diff options
author | Christian Segundo | 2023-12-30 15:55:40 +0100 |
---|---|---|
committer | Christian Segundo | 2024-04-07 10:39:02 +0200 |
commit | 6cf291fc180874b778a7c0a89f193cf731edfa20 (patch) | |
tree | b0f1a4f2091d251a2e437c882bb0ba0ff9f1dc3b /README.md | |
parent | 0fbf70bb03047bb4fa84d0cae652af0ea869d5ee (diff) | |
download | languagetool-6cf291fc180874b778a7c0a89f193cf731edfa20.tar.gz |
update readme
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 45 |
1 files changed, 21 insertions, 24 deletions
@@ -1,18 +1,8 @@ - +# [languagetool](https://git.segundo.io/docker/languagetool/tree/) -# Introduction +> [LanguageTool] image with [ngrams] auto-download -LanguageTool is an Open Source proofÂreading software for English, French, -German, Polish, and more than 20 other languages. - -You can use LanguageTool with a Firefox extension. - -This is a container to get the LanguageTool running on a system without java. - -[LanguageTool]: https://www.languagetool.org/ -[Firefox extension]: https://addons.mozilla.org/firefox/addon/languagetool - -# Usage +## Usage The Server is running on port 8010, this port should exposed. @@ -20,40 +10,47 @@ The Server is running on port 8010, this port should exposed. [...] docker run --rm -p 8010:8010 docker.io/chn2guevara/languagetool -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`. +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`. ## Configuration ### Java heap size -You can set any Java related option using the `JAVAOPTIONS` environment variable. +You can set any Java related option using the `JAVAOPTIONS` environment +variable. docker run --rm -it -p 8010:8010 -e JAVAOPTIONS="-Xmx382M" docker.io/chn2guevara/languagetool ### HTTPServerConfig -Any environment variable prefixed with `LT_` is interpreted as an [HTTPServerConfig] option. +Any environment variable prefixed with `LT_` is interpreted as an +[HTTPServerConfig] option. docker run --rm -it -p 8010:8010 -p 9301:9301 \ -e LT_prometheusMonitoring=true \ docker.io/chn2guevara/languagetool [...] - - curl -s localhost:9301 | grep -v '^\s*$\|^\s*\#' (k8s-pro) + + curl -s localhost:9301 | grep -v '^\s*$\|^\s*\#' languagetool_check_matches_total{language="en",mode="ALL",} 1.0 languagetool_threadpool_queue_size{pool="lt-server-thread",} 0.0 [...] ### n-gram dataset support -To support [ngrams] you need an additional volume or directory mounted to the `/ngrams` directory. +To support [ngrams] you need an additional volume or directory mounted to the +`/ngrams` directory. docker run ... -v /foo:/ngrams ... ### Automatic download -This image can take care of the initial download of any ngram supported language as well as updates. -Mount a directory or volume to `/ngrams` and use the `NGRAM_LANGUAGES` environment variable to pass a comma separated string with languages: +This image can take care of the initial download of any ngram supported +language as well as updates. Mount a directory or volume to `/ngrams` and use +the `NGRAM_LANGUAGES` environment variable to pass a comma separated string +with languages: docker run ... -v /path/to/ngrams:/ngrams -e NGRAM_LANGUAGES="en,es" ... @@ -66,7 +63,7 @@ Download and unzip any language with the commands: (cd ngrams && unzip ../ngrams-en-YYYYMMDD.zip) rm -f ngrams-en-YYYYMMDD.zip -It is important that the directory structure ends up looking like: +It's important that the directory structure ends up looking like: ngrams/ en/ @@ -74,6 +71,6 @@ It is important that the directory structure ends up looking like: es/ ... - -[ngrams]: http://wiki.languagetool.org/finding-errors-using-n-gram-data +[LanguageTool]: https://languagetool.org +[ngrams]: https://dev.languagetool.org/finding-errors-using-n-gram-data [HTTPServerConfig]: https://languagetool.org/development/api/org/languagetool/server/HTTPServerConfig.html |