rename files and separate sentences and references
This commit is contained in:
parent
b2ba027fc9
commit
79032fc1d7
5
Jenkinsfile
vendored
5
Jenkinsfile
vendored
@ -31,9 +31,10 @@ pipeline {
|
||||
stage('Zadanie 3 - Metryki') {
|
||||
steps {
|
||||
sh 'python3 --version'
|
||||
sh 'python3 ./zadanie3/sentences.py'
|
||||
sh 'python3 ./zadanie3/script.py'
|
||||
sh 'chmod 755 ./zadanie3/trn.sh'
|
||||
sh './zadanie3/trn.sh'
|
||||
sh './zadanie3/trn.sh zadanie3/sentences.txt zadanie3/sentences.trn'
|
||||
sh './zadanie3/trn.sh zadanie3/references.txt zadanie3/references.trn'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
11
zadanie3/script.py
Normal file
11
zadanie3/script.py
Normal file
@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import numpy, pandas
|
||||
|
||||
input_data = pandas.read_csv('ASR-eval/wikiniews_results.tsv', encoding='utf8', error_bad_lines=False, sep='\t', header=None)
|
||||
sentences = input_data[1]
|
||||
references = input_data[2]
|
||||
|
||||
numpy.savetxt('zadanie3/sentences.txt', sentences, '%s')
|
||||
numpy.savetxt('zadanie3/references.txt', references, '%s')
|
@ -1,9 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import numpy, pandas
|
||||
|
||||
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.txt', sentences, '%s')
|
@ -1 +1 @@
|
||||
awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' < zadanie3/reference.txt > zadanie3/sentences.trn
|
||||
awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' < $S1 > $S2
|
Loading…
Reference in New Issue
Block a user