From a62d481926e359379bde3a4a62456e1964ac9d49 Mon Sep 17 00:00:00 2001 From: Ulli Hagenlocher Date: Thu, 5 Jun 2025 16:07:33 +0200 Subject: [PATCH] Extnded README (How to add new models) --- README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2f1362c..682506b 100644 --- a/README.md +++ b/README.md @@ -114,4 +114,15 @@ Due to the volume mapping specified in the `docker container run` command (see a ``` cd /escrito/de.unidue.ltl.escrito && mvn compile -Dmaven.repo.local=/.m2/repository -DskipTests -o -e ``` -The `-o` flag tells maven to work in 'offline mode', i.e. it forces maven to only rely on resources that are locally available. This makes the re-build quite fast. After the re-build is done, run `classify.sh` again and you should be able to observe that your changes have taken effect. \ No newline at end of file +The `-o` flag tells maven to work in 'offline mode', i.e. it forces maven to only rely on resources that are locally available. This makes the re-build quite fast. After the re-build is done, run `classify.sh` again and you should be able to observe that your changes have taken effect. + +## How to add new models +escrito Server: + - Insert new models into dkpro\models + - Add new models to \var\www\nodejs\escrito -> model_names.js + - In docker/escrito-docker -> Dockerfile, comment out: # ENTRYPOINT ["/bin/sh", "-c", "while true; do sleep 1; done"] # infinite loop + - Rebuild Image: docker image build --no-cache -t escrito:latest . + - Rebuild Container: docker container run -td -v ./local:/escrito/de.unidue.ltl.escrito/de.unidue.ltl.escrito.examples/src/main/java/de/unidue/ltl/escrito/examples/local -v ./scripts:/scripts --name escrito-demo escrito:latest + - Adjust line 22 in \var\www\nodejs\escrito -> index.js: exec(`docker container exec -t escrito-demo /scripts/classify.sh '${names[res.req.body.name]}' '${res.req.body.text}'`, (error, stdout, stderr) => { + - \var\www\nodejs\escrito sudo systemctl stop nodejs-escrito.service + - \var\www\nodejs\escrito sudo systemctl start nodejs-escrito.service \ No newline at end of file