up
This commit is contained in:
parent
6d9403bbbb
commit
fa9163b1b7
1
Jenkinsfile
vendored
1
Jenkinsfile
vendored
@ -25,6 +25,7 @@ pipeline {
|
|||||||
archiveArtifacts 'wikiniews_results.tsv'
|
archiveArtifacts 'wikiniews_results.tsv'
|
||||||
archiveArtifacts 'wer.txt'
|
archiveArtifacts 'wer.txt'
|
||||||
archiveArtifacts 'srr.txt'
|
archiveArtifacts 'srr.txt'
|
||||||
|
archiveArtifacts 'results'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage("buildMetrics") {
|
stage("buildMetrics") {
|
||||||
|
@ -3,34 +3,34 @@
|
|||||||
#zad 1
|
#zad 1
|
||||||
wc -l wikiniews_results.tsv > counted_lines_result.txt
|
wc -l wikiniews_results.tsv > counted_lines_result.txt
|
||||||
|
|
||||||
##zad 3
|
#zad 3
|
||||||
## dzielenie linii
|
# dzielenie linii
|
||||||
#cut --fields=2 wikiniews_results.tsv > hypothesis.txt
|
cut --fields=2 wikiniews_results.tsv > hypothesis.txt
|
||||||
#cut --fields=3 wikiniews_results.tsv > reference.txt
|
cut --fields=3 wikiniews_results.tsv > reference.txt
|
||||||
#
|
|
||||||
## tworzenie plikow trn
|
# tworzenie plikow trn
|
||||||
#awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' < hypothesis.txt > hypothesis.trn
|
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
|
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 Score > results
|
sclite -f 0 -r reference.trn trn -h hypothesis.trn trn -e utf-8 -i rm -o all stdout | grep Score > results
|
||||||
#
|
|
||||||
## #correct words #substitutions #deletions #insertions do obliczen WER
|
# #correct words #substitutions #deletions #insertions do obliczen WER
|
||||||
#awk 'BEGIN{OFS="\t"}{print $6, $7, $8, $9}' < results | awk '{ print ($2 + $3 + $4)/($2 + $3 + $1) }' > wer.tsv
|
awk 'BEGIN{OFS="\t"}{print $6, $7, $8, $9}' < results | awk '{ print ($2 + $3 + $4)/($2 + $3 + $1) }' > wer.tsv
|
||||||
#
|
|
||||||
#paste wikiniews_results.tsv wer.tsv > wikiniews_results.tsv
|
paste wikiniews_results.tsv wer.tsv > wikiniews_results.tsv
|
||||||
#
|
|
||||||
## procent niepoprawnie rozpoznanych wyrazów
|
# procent niepoprawnie rozpoznanych wyrazów
|
||||||
#awk 'BEGIN{FS=OFS="\t"}{ bad = bad + $1; all++ }END{ print bad/all }' < wer.tsv >> wer.txt
|
awk 'BEGIN{FS=OFS="\t"}{ bad = bad + $1; all++ }END{ print bad/all }' < wer.tsv >> wer.txt
|
||||||
#
|
|
||||||
## procent całkowicie poprawnie rozpoznanych zdań
|
# procent całkowicie poprawnie rozpoznanych zdań
|
||||||
#awk 'BEGIN{FS=OFS="\t"}{ if ( $1 == 0 ) good++; all++ }END{ print good/all }' < wer.tsv >> srr.txt
|
awk 'BEGIN{FS=OFS="\t"}{ if ( $1 == 0 ) good++; all++ }END{ print good/all }' < wer.tsv >> srr.txt
|
||||||
#
|
|
||||||
## zamiana treści
|
# zamiana treści
|
||||||
#tail -n 50 wer.txt > wer1.txt
|
tail -n 50 wer.txt > wer1.txt
|
||||||
#tail -n 50 srr.txt > srr1.txt
|
tail -n 50 srr.txt > srr1.txt
|
||||||
#
|
|
||||||
#rm wer.txt
|
rm wer.txt
|
||||||
#rm srr.txt
|
rm srr.txt
|
||||||
#
|
|
||||||
#mv wer1.txt wer.txt
|
mv wer1.txt wer.txt
|
||||||
#mv srr1.txt srr.txt
|
mv srr1.txt srr.txt
|
||||||
|
Loading…
Reference in New Issue
Block a user