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