use cut instead of python

This commit is contained in:
s407323 2019-04-26 15:02:00 +02:00
parent 79032fc1d7
commit e508a430d4
3 changed files with 8 additions and 6 deletions

5
Jenkinsfile vendored
View File

@ -30,11 +30,8 @@ pipeline {
stage('Zadanie 3 - Metryki') { stage('Zadanie 3 - Metryki') {
steps { steps {
sh 'python3 --version'
sh 'python3 ./zadanie3/script.py'
sh 'chmod 755 ./zadanie3/trn.sh' sh 'chmod 755 ./zadanie3/trn.sh'
sh './zadanie3/trn.sh zadanie3/sentences.txt zadanie3/sentences.trn' sh './zadanie3/trn.sh'
sh './zadanie3/trn.sh zadanie3/references.txt zadanie3/references.trn'
} }
} }
} }

View File

@ -3,7 +3,7 @@
import numpy, pandas import numpy, pandas
input_data = pandas.read_csv('ASR-eval/wikiniews_results.tsv', encoding='utf8', 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]
references = input_data[2] references = input_data[2]

View File

@ -1 +1,6 @@
awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' < $S1 > $S2
cut -f 2 ASR-eval/wikiniews_results.tsv > zadanie3/sentences.txt
cut -f 3 ASR-eval/wikiniews_results.tsv > zadanie3/references.txt
awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' < zadanie3/sentences.txt > zadanie3/sentences.trn
awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' < zadanie3/references.txt > zadanie3/references.trn