26 lines
646 B
Bash
Executable File
26 lines
646 B
Bash
Executable File
#!/bin/bash
|
|
cat output.txt | awk '{print (($7 + $8 + $9)/($7 + $8 + $6))*100;}' > clear.txt
|
|
|
|
paste -d ' ' wikiniews_results.tsv clear.txt > support.tsv
|
|
cat support.tsv > wikiniews_results.tsv
|
|
|
|
avg=$(numaverage clear.txt)
|
|
|
|
srr_matching=$(grep -x "0" clear.txt | wc -l)
|
|
all=$(cat clear.txt | wc -l)
|
|
srr=$(echo "($srr_matching/$all)*100" | bc -l)
|
|
|
|
echo "$avg" >> averagewer.txt
|
|
echo "$srr" >> averagesrr.txt
|
|
|
|
tail -n 50 averagewer.txt > averagewertmp.txt
|
|
cat averagewertmp.txt > averagewer.txt
|
|
|
|
tail -n 50 averagesrr.txt > averagesrrtmp.txt
|
|
cat averagesrrtmp.txt > averagesrr.txt
|
|
|
|
echo "Avg WER: $avg%" >> clear.txt
|
|
echo "SRR: $srr%" >> clear.txt
|
|
|
|
|