cut files into 2 parts - to trn

This commit is contained in:
Małgorzata Schmidt 2019-04-26 13:21:09 +02:00
parent 835051026f
commit a22dc93fc6
3 changed files with 8 additions and 1 deletions

View File

@ -9,4 +9,3 @@ RUN git clone https://github.com/usnistgov/SCTK.git
WORKDIR SCTK
RUN make config && make all && make check && make install && make doc
ENV PATH=$PATH:/SCTK/bin

1
Jenkinsfile vendored
View File

@ -7,6 +7,7 @@ pipeline {
checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: '8cdbf19a-e62d-4807-9112-bc7a8d225074', url: 'https://git.wmi.amu.edu.pl/s407608/s407608-mlworkshops']]])
sh 'sh my_shell_script.sh wikiniews_results.tsv > results.txt'
archiveArtifacts 'results.txt'
sh 'sh evaluation.sh wikiniews_results.tsv'
}
}
}

7
evaluation.sh Normal file
View File

@ -0,0 +1,7 @@
file1=$1
cut -f2 $file1 > reference.txt
cut -f3 $file1 > hypothesis.txt
awk '{print gensub("^\\*\\*", "\\\\**", "g", $0) "\t(sp1_"NR")"}' < reference.txt > reference.trn
awk '{print gensub("^\\*\\*", "\\\\**", "g", $0) "\t(sp1_"NR")"}' < hypothesis.txt > hypothesis.trn