zadanie3 test27

This commit is contained in:
massta 2020-04-03 17:31:24 +02:00
parent 822a5ec659
commit 1962564aa1

View File

@ -1,13 +1,14 @@
#!/bin/bash #!/bin/bash
cat output.txt | awk '{print (($7 + $8 + $9)/($7 + $8 + $6))*100;}' > clear.txt cat output.txt | awk '{print (($7 + $8 + $9)/($7 + $8 + $6))*100;}' > clear.txt
paste -d ' ' wikiniews_results.tsv clear.txt paste -d ' ' wikiniews_results.tsv clear.txt > wikiniews_results.tsv
avg=$(numaverage clear.txt) avg=$(numaverage clear.txt)
avg=$($avg*100) avg=$($avg*100)
srr_matching=$(grep -x "0" clear.txt | wc -l) srr_matching=$(grep -x "0" clear.txt | wc -l)
all=$(cat clear.txt | wc -l) all=$(cat clear.txt | wc -l)
srr=$(echo "($srr_matching/$all)*100" | bc -l) srr=$(echo "($srr_matching/$all)" | bc -l)
srr=$($srr*100)
echo "Avg WER: $avg%" >> clear.txt echo "Avg WER: $avg%" >> clear.txt
echo "SRR: 0$srr%" >> clear.txt echo "SRR: $srr%" >> clear.txt