create sentences file

This commit is contained in:
s407323 2019-04-26 14:37:22 +02:00
parent 1d91d349f7
commit b2ba027fc9
3 changed files with 6 additions and 4 deletions

4
Jenkinsfile vendored
View File

@ -31,7 +31,9 @@ pipeline {
stage('Zadanie 3 - Metryki') { stage('Zadanie 3 - Metryki') {
steps { steps {
sh 'python3 --version' sh 'python3 --version'
sh 'python3 ./zadanie3/script.py' sh 'python3 ./zadanie3/sentences.py'
sh 'chmod 755 ./zadanie3/trn.sh'
sh './zadanie3/trn.sh'
} }
} }
} }

View File

@ -3,8 +3,7 @@
import numpy, pandas 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] sentences = input_data[1]
numpy.savetxt('zadanie3/sentences.tsv', input_data[1], '%s') numpy.savetxt('zadanie3/sentences.txt', sentences, '%s')

1
zadanie3/trn.sh Normal file
View File

@ -0,0 +1 @@
awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' < zadanie3/reference.txt > zadanie3/sentences.trn