From f38ae80b5b960c0eb53fad4ea16935f3034f3c76 Mon Sep 17 00:00:00 2001 From: Dawid Jurkiewicz Date: Fri, 3 Apr 2020 13:27:22 +0200 Subject: [PATCH] switch to python2 --- Dockerfile | 1 - calc_metrics.sh | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index aaeb107..bf3941c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,6 @@ RUN apt install -y git RUN apt install -y gcc RUN gcc --version RUN apt install -y build-essential -RUN apt install -y python3 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 0fe63ce..06e653e 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" | python3 -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" | python2 -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