dodanie plikow aby wyliczyc wer
This commit is contained in:
parent
a4b0777f26
commit
d975559e1b
4
Jenkinsfile
vendored
4
Jenkinsfile
vendored
@ -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
20
WERcreator.py
Normal 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
|
Loading…
Reference in New Issue
Block a user