diff --git a/Jenkinsfile b/Jenkinsfile index 737792b..590df80 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -31,7 +31,9 @@ pipeline { stage('Zadanie 3 - Metryki') { steps { sh 'python3 --version' - sh 'python3 ./zadanie3/script.py' + sh 'python3 ./zadanie3/sentences.py' + sh 'chmod 755 ./zadanie3/trn.sh' + sh './zadanie3/trn.sh' } } } diff --git a/zadanie3/script.py b/zadanie3/sentences.py similarity index 57% rename from zadanie3/script.py rename to zadanie3/sentences.py index fd79857..f874ed1 100644 --- a/zadanie3/script.py +++ b/zadanie3/sentences.py @@ -3,8 +3,7 @@ import numpy, pandas -input_data = pandas.read_csv('ASR-eval/wikiniews_results.tsv', error_bad_lines=False, sep='\t', header=None) - +input_data = pandas.read_csv('ASR-eval/wikiniews_results.tsv', encoding='latin1', error_bad_lines=False, sep='\t', header=None) sentences = input_data[1] -numpy.savetxt('zadanie3/sentences.tsv', input_data[1], '%s') \ No newline at end of file +numpy.savetxt('zadanie3/sentences.txt', sentences, '%s') \ No newline at end of file diff --git a/zadanie3/trn.sh b/zadanie3/trn.sh new file mode 100644 index 0000000..28dc058 --- /dev/null +++ b/zadanie3/trn.sh @@ -0,0 +1 @@ +awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' < zadanie3/reference.txt > zadanie3/sentences.trn \ No newline at end of file