up
This commit is contained in:
parent
69c6410af8
commit
6d9403bbbb
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
*.tsv
|
||||||
|
*.txt
|
||||||
|
*.trn
|
||||||
|
results
|
56
count_lines.sh
Normal file → Executable file
56
count_lines.sh
Normal file → Executable file
@ -3,28 +3,34 @@
|
|||||||
#zad 1
|
#zad 1
|
||||||
wc -l wikiniews_results.tsv > counted_lines_result.txt
|
wc -l wikiniews_results.tsv > counted_lines_result.txt
|
||||||
|
|
||||||
#zad 3
|
##zad 3
|
||||||
cut --fields=2 wikiniews_results.tsv > hypothesis.txt
|
## dzielenie linii
|
||||||
cut --fields=3 wikiniews_results.tsv > reference.txt
|
#cut --fields=2 wikiniews_results.tsv > hypothesis.txt
|
||||||
|
#cut --fields=3 wikiniews_results.tsv > reference.txt
|
||||||
awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' < hypothesis.txt > hypothesis.trn
|
#
|
||||||
awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' < reference.txt > reference.trn
|
## tworzenie plikow trn
|
||||||
|
#awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' < hypothesis.txt > hypothesis.trn
|
||||||
sclite -f 0 -r reference.trn trn -h hypothesis.trn trn -e utf-8 -i rm -o all stdout | grep Score > results
|
#awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' < reference.txt > reference.trn
|
||||||
|
#
|
||||||
# #C #S #D #I do obliczen WER
|
#sclite -f 0 -r reference.trn trn -h hypothesis.trn trn -e utf-8 -i rm -o all stdout | grep Score > results
|
||||||
awk 'BEGIN{OFS="\t"}{print $6, $7, $8, $9}' < results | awk '{ print ($2 + $3 + $4)/($2 + $3 + $1) }' > wer.tsv
|
#
|
||||||
|
## #correct words #substitutions #deletions #insertions do obliczen WER
|
||||||
paste wikiniews_results.tsv wer.tsv > wikiniews_results.tsv
|
#awk 'BEGIN{OFS="\t"}{print $6, $7, $8, $9}' < results | awk '{ print ($2 + $3 + $4)/($2 + $3 + $1) }' > wer.tsv
|
||||||
|
#
|
||||||
awk 'BEGIN{FS=OFS="\t"}{ bad = bad + $1; all++ }END{ print bad/all }' < wer.tsv >> wer.txt
|
#paste wikiniews_results.tsv wer.tsv > wikiniews_results.tsv
|
||||||
awk 'BEGIN{FS=OFS="\t"}{ if ( $1 == 0 ) good++; all++ }END{ print good/all }' < wer.tsv >> srr.txt
|
#
|
||||||
|
## procent niepoprawnie rozpoznanych wyrazów
|
||||||
tail -n 50 wer.txt > wer1.txt
|
#awk 'BEGIN{FS=OFS="\t"}{ bad = bad + $1; all++ }END{ print bad/all }' < wer.tsv >> wer.txt
|
||||||
tail -n 50 srr.txt > srr1.txt
|
#
|
||||||
|
## procent całkowicie poprawnie rozpoznanych zdań
|
||||||
rm wer.txt
|
#awk 'BEGIN{FS=OFS="\t"}{ if ( $1 == 0 ) good++; all++ }END{ print good/all }' < wer.tsv >> srr.txt
|
||||||
rm srr.txt
|
#
|
||||||
|
## zamiana treści
|
||||||
mv wer1.txt wer.txt
|
#tail -n 50 wer.txt > wer1.txt
|
||||||
mv srr1.txt srr.txt
|
#tail -n 50 srr.txt > srr1.txt
|
||||||
|
#
|
||||||
|
#rm wer.txt
|
||||||
|
#rm srr.txt
|
||||||
|
#
|
||||||
|
#mv wer1.txt wer.txt
|
||||||
|
#mv srr1.txt srr.txt
|
||||||
|
@ -1,200 +0,0 @@
|
|||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0.133333
|
|
||||||
0
|
|
||||||
0.363636
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0.0588235
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0.375
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0.105263
|
|
||||||
0
|
|
||||||
0.24
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0.2
|
|
||||||
0.333333
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0.142857
|
|
||||||
0.173913
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0.0645161
|
|
||||||
0.470588
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0.84
|
|
||||||
0
|
|
||||||
0.0625
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0.0454545
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0.117647
|
|
||||||
0
|
|
||||||
0.137931
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0.703704
|
|
||||||
0
|
|
||||||
0.0357143
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0.0714286
|
|
||||||
0
|
|
||||||
0.15
|
|
||||||
0.136364
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0.0588235
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0.333333
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0.15
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0.153846
|
|
||||||
0.0714286
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0.0909091
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0.0666667
|
|
||||||
0
|
|
||||||
0.645161
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0.0625
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0.5
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0.133333
|
|
||||||
0.105263
|
|
||||||
0.692308
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0.0625
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0.25
|
|
||||||
0.214286
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0.03125
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0.047619
|
|
||||||
0.8
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0.0588235
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0.2
|
|
|
Loading…
Reference in New Issue
Block a user