#!/bin/bash # first arg should be text to translate # second (optional) arg should be additional dictionary mkdir data cp "$1" data/text.txt if [ ! -z "$2" ] then : cp "$2" data/dictionary.tsv fi # TODO inject dictionary - current model does not utilize additional dictionary anyway docker build -t translator . docker run --name trslt translator docker cp trslt:/app/translation_output.txt . docker rm trslt rm -rf data