Metryki
This commit is contained in:
parent
9462234c72
commit
20de94059f
4
Jenkinsfile
vendored
4
Jenkinsfile
vendored
@ -20,6 +20,10 @@ pipeline {
|
|||||||
echo 'Metryki'
|
echo 'Metryki'
|
||||||
sh label: '', script: 'chmod 755 ./kody-metryki.sh'
|
sh label: '', script: 'chmod 755 ./kody-metryki.sh'
|
||||||
sh label: '', script: './kody-metryki.sh'
|
sh label: '', script: './kody-metryki.sh'
|
||||||
|
archiveArtifacts 'WER.txt'
|
||||||
|
archiveArtifacts 'SSR.txt'
|
||||||
|
archiveArtifacts 'avgSSR.txt'
|
||||||
|
archiveArtifacts 'wikiniews_results_metryki.tsv'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,11 @@ awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' < hypothesis.txt > hypothesis.tr
|
|||||||
awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' < reference.txt > reference.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 > wynik.txt
|
sclite -f 0 -r reference.trn trn -h hypothesis.trn trn -e utf-8 -i rm -o all stdout > wynik.txt
|
||||||
|
|
||||||
grep 'Scores:' wynik.txt | awk '{print $6, $7, $8, $9}' > scores.txt
|
grep 'Scores:' wynik.txt | awk '{print $6, $7, $8, $9}' > scores.txt
|
||||||
cat scores.txt
|
|
||||||
|
awk '{ print ($2 + $3 + $4) / ($2 + $3 + $1) }' scores.txt > WER.txt
|
||||||
|
awk '{ n++; if ($2 == 0 && $3 == 0 && $4 == 0) poprawne += 1 } END { print poprawne/n }' scores.txt > SSR.txt
|
||||||
|
awk '{ n++; suma += $1 } END { print suma/n }' WER.txt > avgSSR.txt
|
||||||
|
|
||||||
|
|
||||||
|
paste WER.txt wikiniews_results.tsv > wikiniews_results_metryki.tsv
|
Loading…
Reference in New Issue
Block a user