awk in dockerfile

This commit is contained in:
Krzysztof Jurkiewicz 2019-04-26 13:49:10 +02:00
parent c21f33c3ce
commit 95b6b542c1

View File

@ -1,16 +1,24 @@
while read line; do
echo "processing: $line"
echo "$line" | awk -F '\t' '{print $1}'
echo "$line" | awk -F '\t' '{print $2}' > hypothesis.txt
echo "$line" | awk -F '\t' '{print $3}' > reference.txt
# while read line; do
# echo "processing: $line"
# echo "$line" | awk -F '\t' '{print $1}'
# echo "$line" | awk -F '\t' '{print $2}' > hypothesis.txt
# echo "$line" | awk -F '\t' '{print $3}' > reference.txt
#
# awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' < reference.txt > reference.trn
# awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' < hypothesis.txt > hypothesis.trn
#
# sclite -f 0 -r reference.trn trn -h hypothesis.trn trn -e utf-8 -i rm -o all stdout
#
# done < wikiniews_results.tsv
awk -F '\t' '{print $2}' < wikiniews_results.tsv > hypothesis.txt
awk -F '\t' '{print $3}' < wikiniews_results.tsv > reference.txt
awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' < reference.txt > reference.trn
awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' < hypothesis.txt > hypothesis.trn
sclite -f 0 -r reference.trn trn -h hypothesis.trn trn -e utf-8 -i rm -o all stdout
done < wikiniews_results.tsv
sclite -f 0 -r reference.trn trn -h hypothesis.trn trn -e utf-8 -i rm -o all stdout
#
# awk '{print gensub("^\\*\\*", "\\\\**", "g", $0) "\t(sp1_"NR")"}'\