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{
|
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') {
|
||||||
|
10
count.sh
10
count.sh
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user