diff --git a/Jenkinsfile b/Jenkinsfile index c88a24c..5677941 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,5 +6,10 @@ archiveArtifacts 'output' def customImage = docker.build("my-custom-image") customImage.inside { sh 'echo aaaa' + sh 'awk -f file.awk < wikiniews_results.tsv > hypothesis.txt' + sh 'awk -f file2.awk < wikiniews_results.tsv > reference.txt' + sh 'awk \'{print gensub("^\\*\\*", "\\\\**", "g", $0) "\t(sp1_"NR")"}\' < reference.txt > reference.trn + sh 'awk \'{print gensub("^\\*\\*", "\\\\**", "g", $0) "\t(sp1_"NR")"}\' < hypothesis.txt > hypothesis.trn + sh 'sclite -f 0 -r reference.trn trn -h hypothesis.trn trn -e utf-8 -i rm -o all srdout' } } diff --git a/file.awk b/file.awk new file mode 100644 index 0000000..e43bb1d --- /dev/null +++ b/file.awk @@ -0,0 +1,7 @@ +BEGIN { + FS="\\t" +} + +{ + print $2 +} diff --git a/file2.awk b/file2.awk new file mode 100644 index 0000000..c71b318 --- /dev/null +++ b/file2.awk @@ -0,0 +1,7 @@ +BEGIN { + FS="\\t" +} + +{ + print $3 +}