add python, edit script

This commit is contained in:
dylodylo 2020-04-04 16:20:30 +02:00
parent fca03bfe43
commit 5506f882bf
2 changed files with 5 additions and 2 deletions

1
Jenkinsfile vendored
View File

@ -13,6 +13,7 @@ pipeline {
{
steps{
copyArtifacts fingerprintArtifacts: true, projectName: 'ASR-eval', selector: lastSuccessful()
copyArtifacts filter: 'srr.txt wer.txt', fingerprintArtifacts: true, projectName: 's460929-metrics', selector: lastSuccessful()
}
}

View File

@ -8,10 +8,12 @@ cut -f2 $MYFILE | awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' > hypothesis.t
cut -f3 $MYFILE | awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' > reference.trn
#wer for each line
sclite -f 0 -r reference.trn trn -h hypothesis.trn trn -e utf-8 -i rm -o all stdout > wer.txt
echo wer.txt | sclite -f 0 -r reference.trn trn -h hypothesis.trn trn -e utf-8 -i rm -o all stdout >> wer.txt
echo "$(tail -50 "wer.txt")" > srr.txt
COUNT_DIFF=$(diff hypothesis.trn reference.trn | grep "^>" | wc -l)
echo $COUNT_DIFF
let RESULT=$COUNT_DIFF/$COUNT
echo $(echo "$COUNT_DIFF/$COUNT" | bc -l)
echo $(echo "$COUNT_DIFF/$COUNT" | bc -l) > srr.text
echo $(echo "$COUNT_DIFF/$COUNT" | bc -l) >> srr.txt
echo "$(tail -50 "srr.txt")" > srr.txt