add avg and ssr

This commit is contained in:
s407323 2019-04-26 16:32:23 +02:00
parent 75faa69ce9
commit 521bfbc110
2 changed files with 12 additions and 1 deletions

2
Jenkinsfile vendored
View File

@ -39,6 +39,8 @@ pipeline {
sh './zadanie3/grep.sh'
archiveArtifacts 'zadanie3/wikiniews_results_wer.tsv'
archiveArtifacts 'zadanie3/wikiniews_results.tsv'
archiveArtifacts 'zadanie3/avg.tsv'
archiveArtifacts 'zadanie3/ssr.tsv'
}
}
}

View File

@ -1,5 +1,14 @@
# (S + D + I)/(S + D + C)
#C #S #D #I - $6 $7 $8 $9
# (S + D + I)/(S + D + C) WER
cat zadanie3/sclite.txt | grep -e "Scores: " | awk '{ print 100.0 * ($7 + $8 + $9) / ($7 + $8 + $6) }' > zadanie3/wikiniews_results_wer.tsv
cp ASR-eval/wikiniews_results.tsv zadanie3/wikiniews_results.tsv
paste zadanie3/wikiniews_results_wer.tsv zadanie3/wikiniews_results.tsv
## SSR
cat zadanie3/sclite.txt | grep -e "Scores: " | awk '{ if ($7 == 0 && $8 == 0 && $9 == 0) print 1 }' | wc -l > zadanie3/ssr.txt
## AVG
cat zadanie3/wikiniews_results_wer.tsv | awk '{ sum+=$1 } END { print sum/NR}' | wc -l > zadanie3/avg.txt