Skip to content

LanguageTool

This egg installs a LanguageTool server LanguageTool is an Open Source proofreading software for English, French, German, Polish, Russian, and more than 20 other languages. It finds many errors that a simple spell checker cannot find. View https://languagetool.org for more information.

egg-languagetool.json

updated

Install

Installer image
ghcr.io/ptero-eggs/installers:alpine
Install script
47 lines

Image

  • Java 17 ghcr.io/ptero-eggs/yolks:java_17

Startup

The Panel runs this command to start the server. It replaces each variable in the command with the value of that variable.

1 variable

Startup command

java -cp languagetool-server.jar org.languagetool.server.HTTPServer --port 25565 --allow-origin --public --config config.properties

Dotted values come from the server settings. These values are examples.

  • This uses many gigabytes of disk space. Separate each value with spaces. For example, "de en". View all available models at https://languagetool.org/download/ngram-data/

    TRAIN_MODELSUsers can edit

    nullable|string

Wings

Stop command
^C (SIGINT)
Running when the console shows
Server started

Files Wings edits

Wings sets these values in these files before each start.

config.properties properties

languageModel
models/

Readme

LanguageTool

LanguageTool is an Open Source proofreading software for English, French, German, Polish, Russian, and more than 20 other languages. It finds many errors that a simple spell checker cannot find.

View https://languagetool.org for more information.

Requires one port for comunication.

Try addr:port/v2/check?language=en-US&text=this+is+a+test to test

Changes

  1. fix docker images path

    · Daniel Barton · 7d2b714

  2. Replace docker images

    · Daniel Barton · 3759ed6

  3. Add software

    · rowansc1 · 9b56a00

All changes on GitHub

Problem with this egg?

Open an issue on GitHub. Include your Panel and Wings versions.

Install script 47 lines ash in ghcr.io/ptero-eggs/installers:alpine Show
#!/bin/ash
apk add --no-cache unzip # to make shure the unzipper is working properly
mkdir -p /mnt/server
mkdir -p /mnt/server/models
touch config.properties

# if TRAIN_MODELS has content install them
if [ -n TRAIN_MODELS ]; then

    content=$(curl -L https://languagetool.org/download/ngram-data/)

    links=$(echo "$content" | grep -o '<a href="[^"]*\.zip">' | sed 's/<a href="//' | sed 's/">//')
    echo $links

    cd /mnt/server/models
    for model in $TRAIN_MODELS; do
        echo "$model"
        for link in $links; do
            # echo "    $link"
            if [[ $link == *"-$model-"* ]]; then
                fullLink="https://languagetool.org/download/ngram-data/$link"
                echo "Downloading $fullLink"
                echo "this could take some while"
                curl $fullLink --output $model.zip
                echo "unziping $model.zip"
                unzip $model.zip
                rm $model.zip
            fi
        done
    done
fi

# main languagetool install
cd /mnt/server

echo "downloading languagetool"
curl https://languagetool.org/download/LanguageTool-stable.zip --output download.zip
echo unziping
unzip download.zip
echo moving files

cp -r LanguageTool-*/* .

rm -rf LanguageTool-*
rm download.zip -rf

echo Finished install