1
0

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{ steps{
sh label:"", script:"bash ./count.sh" sh label:"", script:"bash ./count.sh"
@ -26,7 +26,8 @@ pipeline {
stage("Result") stage("Result")
{ {
steps{ steps{
archiveArtifacts 'result.txt' archiveArtifacts 'srr.txt'
archiveArtifacts 'wer.txt'
} }
} }
stage('Hello') { stage('Hello') {

View File

@ -1,12 +1,16 @@
#!/bin/bash #!/bin/bash
MYFILE="wikiniews_results.tsv" MYFILE="wikiniews_results.tsv"
COUNT=0
#wc -l $myfile > result.txt COUNT_DIFF = 0
wc -l $myfile > $COUNT
# create trn # create trn
cut -f2 $MYFILE | awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' > hypothesis.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 cut -f3 $MYFILE | awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' > reference.trn
#wer for each line #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