From f7d80551e71519b2fe7b92e0e2bcf852a5e3d93e Mon Sep 17 00:00:00 2001 From: Dawid Jurkiewicz Date: Fri, 3 Apr 2020 13:32:59 +0200 Subject: [PATCH] fix --- Dockerfile | 2 ++ calc_metrics.sh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index bf3941c..9ab8781 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,6 +5,8 @@ RUN apt install -y git RUN apt install -y gcc RUN gcc --version RUN apt install -y build-essential +RUN apt install -y python +RUN python --version RUN git clone https://github.com/usnistgov/SCTK.git WORKDIR SCTK RUN make config && make all && make check && make install && make doc diff --git a/calc_metrics.sh b/calc_metrics.sh index fdb2647..6c3aa6b 100755 --- a/calc_metrics.sh +++ b/calc_metrics.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash cut -f2 wikiniews_results.tsv | awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' > hyp.trn cut -f3 wikiniews_results.tsv | awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' > ref.trn -sclite -f 0 -r ref.trn trn -h hyp.trn trn -e utf-8 -i rm -o sum stdout | grep "Sum/Avg" | python2 -c "import sys; import re; print('\t'.join(re.findall(r'(\d+\.\d+)', sys.stdin.read())[-2:]))" > wer_srr.txt +sclite -f 0 -r ref.trn trn -h hyp.trn trn -e utf-8 -i rm -o sum stdout | grep "Sum/Avg" | python -c "import sys; import re; print('\t'.join(re.findall(r'(\d+\.\d+)', sys.stdin.read())[-2:]))" > wer_srr.txt cut -f1 wer_srr.txt > wer_total.txt cut -f2 wer_srr.txt > srr.txt