change jenkinsfile
This commit is contained in:
parent
4740133146
commit
c4d84e3970
5
Jenkinsfile
vendored
5
Jenkinsfile
vendored
@ -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') {
|
||||
|
10
count.sh
10
count.sh
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user