dodanie plikow aby wyliczyc wer

This commit is contained in:
alicja.m.musial 2020-04-03 14:58:01 +02:00
parent a4b0777f26
commit d975559e1b
2 changed files with 24 additions and 0 deletions

4
Jenkinsfile vendored
View File

@ -25,12 +25,16 @@ pipeline {
steps{
sh('chmod +x ./metrics.sh')
sh label: 'count', script: './metrics.sh'
sh('chmod +x ./WERcreator.sh')
sh label: 'count wer', script: './WERcreator.py'
}
}
stage('Archive artifacts') {
steps {
archiveArtifacts 'wynik.txt'
archiveArtifacts 'werWIP.txt'
archiveArtifacts 'wertxt.txt'
}
}
}

20
WERcreator.py Normal file
View File

@ -0,0 +1,20 @@
import sys
if __name__ == '__main__':
x = open(werWIP.txt,"r")
y = open(wer.txt,"w")
lines = x.readlines()
for line in lines:
line = lines.split(" ")
c = line[0]
s = line[1]
d = line[2]
i = line[3]
countWER(c,s,d,i)
y.write(countWER)
def countWER(c,s,d,i):
wer = (s + d + i)/(s + d + c)
return wer