diff --git a/Jenkinsfile b/Jenkinsfile index 059e04d..92e61f3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -21,9 +21,18 @@ pipeline { sh label: 'count lines', script: './sclite.sh' } } + stage('Calculations') { + steps { + sh label: 'get all WER', script: './get_wer_lines.sh' + sh label: 'get all WER', script: './avr_wer.sh' + sh label: 'get all WER', script: './ssr.sh' + } + } stage('Archive') { steps { - archiveArtifacts '**' + archiveArtifacts 'ssr.txt' + archiveArtifacts 'wer.txt' + archiveArtifacts 'wikiniews_results.tsv' } } } diff --git a/avr_wer.sh b/avr_wer.sh new file mode 100755 index 0000000..996442e --- /dev/null +++ b/avr_wer.sh @@ -0,0 +1 @@ +awk '{s+=$1;i+=1;} END {print s/i}' variables.txt > wer.txt diff --git a/get_wer_lines.sh b/get_wer_lines.sh new file mode 100755 index 0000000..6492c89 --- /dev/null +++ b/get_wer_lines.sh @@ -0,0 +1,4 @@ +cat result.txt | grep -i -w "Scores: (#C #S #D #I)" | cut -c23- | awk '{print (($2 + $3 + $4)/($2 + $3 + $1))*100;}' > wer_lines.txt +paste -d ' ' wikiniews_results.tsv wer_lines.txt + + diff --git a/ssr.sh b/ssr.sh new file mode 100755 index 0000000..3d7a9cf --- /dev/null +++ b/ssr.sh @@ -0,0 +1,2 @@ +head -n 11 result.txt | tail -n 1 | awk '{print 100-$12;}' > srr.txt +