vhgv
This commit is contained in:
parent
9d393ab52c
commit
4f32c2136e
1
Jenkinsfile
vendored
1
Jenkinsfile
vendored
@ -28,6 +28,7 @@ pipeline {
|
|||||||
archiveArtifacts 'wer.txt'
|
archiveArtifacts 'wer.txt'
|
||||||
archiveArtifacts 'srr.txt'
|
archiveArtifacts 'srr.txt'
|
||||||
archiveArtifacts 'wikiniewsResultsWithWer.tsv'
|
archiveArtifacts 'wikiniewsResultsWithWer.tsv'
|
||||||
|
archiveArtifacts 'werAll.txt'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Build plots')
|
stage('Build plots')
|
||||||
|
23
script.sh
23
script.sh
@ -7,14 +7,15 @@ 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 | grep 'Scores' > wyniki
|
sclite -f 0 -r reference.trn trn -h hypothesis.trn trn -e utf-8 -i rm -o all stdout | grep 'Scores' > wyniki
|
||||||
|
cat results | tail -n10
|
||||||
awk 'BEGIN{OFS="\t"}{print $6, $7, $8, $9}' < scores | awk '{ print ($2 + $3 + $4)/($2 + $3 + $1) }' > wer.tsv
|
cat results | awk 'BEGIN{OFS="\t"}{print $6, $7, $8, $9}' | awk '{ print ($2 + $3 + $4)/($2 + $3 + $1) }' | tail -n 10
|
||||||
paste wikiniews_results.tsv wer.tsv > wikiniewsResultsWithWer.tsv
|
cat results | awk 'BEGIN{OFS="\t"}{print $6, $7, $8, $9}' | awk '{ print ($2 + $3 + $4)/($2 + $3 + $1) }' > werAll.txt
|
||||||
tail -n 50 wer.txt >> wer_tmp.txt
|
awk '{ sum += $1; n++ } END { print sum / n; }' < wer_all.txt >> wer.txt
|
||||||
rm wer.txt
|
paste wikiniews_results.tsv wer.txt > wikinews_results.tsv
|
||||||
mv wer_tmp.txt wer.txt
|
rm wikiniews_results.tsv
|
||||||
tail -n 50 srr.txt >> srr_tmp.txt
|
calc(){ awk "BEGIN { print "$*" }"; }
|
||||||
rm srr.txt
|
all_lines=$( wc -l < wer_all.txt )
|
||||||
mv srr_tmp.txt srr.txt
|
lines_with_0=$( grep -c '^0$' wer_all.txt )
|
||||||
awk 'BEGIN{FS=OFS="\t"}{ bad = bad + $1; all++ }END{ print bad/all }' < wer.tsv >> wer.txt
|
calc $lines_with_0/$all_lines >> srr.txt
|
||||||
awk 'BEGIN{FS=OFS="\t"}{ if ( $1 == 0 ) good++; all++ }END{ print good/all }' < wer.tsv >> srr.txt
|
tail -n50 wer.txt | sponge wer.txt
|
||||||
|
tail -n50 srr.txt | sponge srr.txt
|
Loading…
Reference in New Issue
Block a user