switch to python2

This commit is contained in:
Dawid Jurkiewicz 2020-04-03 13:27:22 +02:00
parent 2f247ed26d
commit f38ae80b5b
2 changed files with 1 additions and 2 deletions

View File

@ -5,7 +5,6 @@ RUN apt install -y git
RUN apt install -y gcc RUN apt install -y gcc
RUN gcc --version RUN gcc --version
RUN apt install -y build-essential RUN apt install -y build-essential
RUN apt install -y python3
RUN git clone https://github.com/usnistgov/SCTK.git RUN git clone https://github.com/usnistgov/SCTK.git
WORKDIR SCTK WORKDIR SCTK
RUN make config && make all && make check && make install && make doc RUN make config && make all && make check && make install && make doc

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
cut -f2 wikiniews_results.tsv | awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' > hyp.trn 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 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 -f1 wer_srr.txt > wer_total.txt
cut -f2 wer_srr.txt > srr.txt cut -f2 wer_srr.txt > srr.txt