change jenkinsfile

This commit is contained in:
dylodylo 2020-04-03 14:44:38 +02:00
parent 4740133146
commit c4d84e3970
2 changed files with 10 additions and 5 deletions

5
Jenkinsfile vendored
View File

@ -16,7 +16,7 @@ pipeline {
}
}
stage("Script")
stage("RunScript")
{
steps{
sh label:"", script:"bash ./count.sh"
@ -26,7 +26,8 @@ pipeline {
stage("Result")
{
steps{
archiveArtifacts 'result.txt'
archiveArtifacts 'srr.txt'
archiveArtifacts 'wer.txt'
}
}
stage('Hello') {

View File

@ -1,12 +1,16 @@
#!/bin/bash
MYFILE="wikiniews_results.tsv"
#wc -l $myfile > result.txt
COUNT=0
COUNT_DIFF = 0
wc -l $myfile > $COUNT
# create trn
cut -f2 $MYFILE | awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' > hypothesis.trn
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 > results.txt
sclite -f 0 -r reference.trn trn -h hypothesis.trn trn -e utf-8 -i rm -o all stdout > wer.txt
diff hypothesis.trn reference.trn | grep "^>" | wc -l > $COUNT_DIFF
$COUNT = $COUNT_DIFF/$COUNT*100 > srr.text