poprawki do obliczania metryk 12
This commit is contained in:
parent
975c3372ef
commit
a8d5f7b7ed
@ -15,7 +15,7 @@ if __name__ == '__main__':
|
||||
if line[:21] == 'Scores: (#C #S #D #I)':
|
||||
lines = line.split(" ")
|
||||
sentenceNumber += 1
|
||||
c, s, d, i = line.strip().split()[-4:]
|
||||
c, s, d, i = line.strip().split()
|
||||
map(int, [c,s,d,i])
|
||||
werC = (s + d + i)/(s + d + c)
|
||||
done = True
|
||||
|
@ -6,7 +6,7 @@ cut -f3 wikiniews_results.tsv > reference.txt
|
||||
awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' < reference.txt > reference.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 "Scores:" | sed 's/Scores: (#C #S #D #I) //' > werWIP.txt
|
||||
sclite -f 0 -r reference.trn trn -h hypothesis.trn trn -e utf-8 -i rm -o all stdout > wynik2.txt
|
||||
|
||||
python3 WERcreator.py werWIP.txt
|
||||
paste werWIP.txt wer.txt > tmp.txt && mv tmp.txt werWIP.txt
|
||||
python3 WERcreator.py wynik2.txt
|
||||
paste wynik2.txt wer.txt > tmp.txt && mv tmp.txt wynik2.txt
|
||||
|
Loading…
Reference in New Issue
Block a user