add ex 3 in process

This commit is contained in:
Olga 2020-04-03 19:06:28 +02:00
parent ebce681fd6
commit 7715303475
3 changed files with 21 additions and 0 deletions

12
Jenkinsfile vendored
View File

@ -29,5 +29,17 @@ pipeline {
archiveArtifacts 'results.txt'
}
}
stage('WER SRR Metrics') {
steps {
sh 'chmod +x ./wersrrmetrics.sh'
sh './wersrrmetrics.sh'
}
}
stage('Copy Metric Artifacts') {
steps {
copyArtifacts filter: 'wer.txt', fingerprintArtifacts: true, projectName: 'ASR-eval', selector: lastSuccessful()
copyArtifacts filter: 'srr.txt', fingerprintArtifacts: true, projectName: 'ASR-eval', selector: lastSuccessful()
}
}
}
}

0
countmetrics.py Normal file
View File

9
wersrrmetrics.sh Normal file
View File

@ -0,0 +1,9 @@
cut -f2 'wikiniews_results.tsv' > hypothesis.txt
cut -f3 'wikiniews_results.tsv' > reference.txt
awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' < hypothesis.txt > hypothesis.trn
awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' < reference.txt > reference.trn
sclite -f 0 -r reference.trn trn -h hypothesis.trn trn -e utf-8 -i rm -o all stdout
python3 countmetrics.py