diff --git a/concordia-aligner/Dockerfile b/concordia-aligner/Dockerfile index 30182c8..35fef87 100644 --- a/concordia-aligner/Dockerfile +++ b/concordia-aligner/Dockerfile @@ -18,5 +18,6 @@ RUN git clone https://git.wmi.amu.edu.pl/rjawor/concordia-aligner.git RUN git clone https://github.com/clab/fast_align RUN cd fast_align && mkdir build && cd build && cmake .. && make && cp fast_align ../../concordia-aligner/ - -#CMD cd concordia-server/fast-aligner/ && make SRC_LANG=pl TRG_LANG=en CORPUS_NAME=opensubtitles_sample \ No newline at end of file +COPY do_align.sh / +ENTRYPOINT ["/do_align.sh"] +CMD [] \ No newline at end of file diff --git a/concordia-aligner/align_corpus.sh b/concordia-aligner/align_corpus.sh index 7747a6a..4a687c0 100755 --- a/concordia-aligner/align_corpus.sh +++ b/concordia-aligner/align_corpus.sh @@ -1,4 +1,5 @@ -#!/bin/sh +#!/bin/bash -#docker run -it --rm --name=concordia-aligner --network=concordiadocker_default --mount src="$(pwd)"/corpora,target=/concordia-aligner/corpora,type=bind concordia-aligner:Dockerfile cd concordia-aligner && make clean && make -docker run -it --rm --name=concordia-aligner --network=concordiadocker_default --mount src="$(pwd)"/corpora,target=/concordia-aligner/corpora,type=bind concordia-aligner:Dockerfile \ No newline at end of file +source corpus.cfg + +docker run -it --rm --name=concordia-aligner --network=concordiadocker_default --mount src="$(pwd)"/corpora,target=/concordia-aligner/corpora,type=bind concordia-aligner:Dockerfile $SRC_LANG_ID $TRG_LANG_ID $CORPUS_NAME diff --git a/concordia-aligner/corpus.cfg_sample b/concordia-aligner/corpus.cfg_sample index c915bcf..d1f78a7 100644 --- a/concordia-aligner/corpus.cfg_sample +++ b/concordia-aligner/corpus.cfg_sample @@ -1,8 +1,10 @@ CORPUS_NAME=opensubtitles_sample CORPUS_PATH=corpora/$CORPUS_NAME -# Language configuration. Available language ids: -# 1 - Polish -# 2 - English +# Language configuration. Available languages: +# 1 - Polish (pl) +# 2 - English (en) SRC_LANG_ID=1 -TRG_LANG_ID=2 \ No newline at end of file +SRC_LANG=pl +TRG_LANG_ID=2 +TRG_LANG=en \ No newline at end of file diff --git a/concordia-aligner/do_align.sh b/concordia-aligner/do_align.sh new file mode 100755 index 0000000..f3de7b8 --- /dev/null +++ b/concordia-aligner/do_align.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +cd /concordia-aligner && make SRC_LANG=$1 TRG_LANG=$2 CORPUS_NAME=$3 clean && make SRC_LANG=$1 TRG_LANG=$2 CORPUS_NAME=$3 \ No newline at end of file diff --git a/concordia-preprocessor/Dockerfile b/concordia-preprocessor/Dockerfile index f798642..aa8c221 100644 --- a/concordia-preprocessor/Dockerfile +++ b/concordia-preprocessor/Dockerfile @@ -13,5 +13,6 @@ RUN pip3 install flask flask_restful gunicorn requests spacy RUN python3 -m spacy download en RUN git clone https://git.wmi.amu.edu.pl/rjawor/concordia-preprocessor.git +RUN cd /concorda-preprocessor/dictionaries && ./generate_dict -CMD cd concordia-preprocessor && ./start_concordia_preprocessor.sh \ No newline at end of file +#CMD cd concordia-preprocessor && ./start_concordia_preprocessor.sh \ No newline at end of file