Wywołanie SCLITE

This commit is contained in:
Krzysztof Moś 2019-05-15 23:48:15 +02:00
parent a17752ac88
commit 5ce51053e9
2 changed files with 15 additions and 0 deletions

7
Jenkinsfile vendored
View File

@ -12,7 +12,14 @@ pipeline {
sh label: '', script: './kody.sh'
sh label: '', script: 'ls -l'
archiveArtifacts 'plik1'
}
}
stage('Stage 2') {
steps {
echo 'Metryki'
sh label: '', script: 'chmod 755 ./kody-metryki.sh'
sh label: '', script: './kody-metryki.sh'
}
}
}

8
kody-metryki.sh Normal file
View File

@ -0,0 +1,8 @@
cut -f 2 wikiniews_results.tsv > reference.txt
cut -f 3 wikiniews_results.tsv > hypothesis.txt
awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' < hypothesis.txt > hypothesis.trn
awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' < reference.txt > reference.trn
sclite -f 0 -r reference.trn trn -h hypothesis.trn trn -e utf-8 -i rm -o all stdout > wynik.txt
cat wynik.txt