WER, SRR calculation

This commit is contained in:
Damian Michalski 2020-04-03 16:31:06 +02:00
parent 4bf5395811
commit f8326a0795
4 changed files with 17 additions and 1 deletions

11
Jenkinsfile vendored
View File

@ -21,9 +21,18 @@ pipeline {
sh label: 'count lines', script: './sclite.sh'
}
}
stage('Calculations') {
steps {
sh label: 'get all WER', script: './get_wer_lines.sh'
sh label: 'get all WER', script: './avr_wer.sh'
sh label: 'get all WER', script: './ssr.sh'
}
}
stage('Archive') {
steps {
archiveArtifacts '**'
archiveArtifacts 'ssr.txt'
archiveArtifacts 'wer.txt'
archiveArtifacts 'wikiniews_results.tsv'
}
}
}

1
avr_wer.sh Executable file
View File

@ -0,0 +1 @@
awk '{s+=$1;i+=1;} END {print s/i}' variables.txt > wer.txt

4
get_wer_lines.sh Executable file
View File

@ -0,0 +1,4 @@
cat result.txt | grep -i -w "Scores: (#C #S #D #I)" | cut -c23- | awk '{print (($2 + $3 + $4)/($2 + $3 + $1))*100;}' > wer_lines.txt
paste -d ' ' wikiniews_results.tsv wer_lines.txt

2
ssr.sh Executable file
View File

@ -0,0 +1,2 @@
head -n 11 result.txt | tail -n 1 | awk '{print 100-$12;}' > srr.txt