WER calculated, Python added
This commit is contained in:
parent
9709404efd
commit
10e7c4cf73
@ -5,6 +5,7 @@ RUN apt install -y git
|
||||
RUN apt install -y gcc
|
||||
RUN gcc --version
|
||||
RUN apt install -y build-essential
|
||||
RUN apt install python3.6
|
||||
RUN git clone https://github.com/usnistgov/SCTK.git
|
||||
WORKDIR SCTK
|
||||
RUN make config && make all && make check && make install && make doc
|
||||
|
@ -10,5 +10,5 @@ sclite -f 0 -r reference.trn trn -h hypothesis.trn trn -e utf-8 -i rm -o all std
|
||||
|
||||
cat WER_SSR.txt | grep -oP '(?<=Scores: \(#C #S #D #I\) ).*' > values.txt
|
||||
|
||||
for i in `cat values.txt`; do c=$((($2+$3+$4)/($2+$3+$1))); echo $c ;done; > values_WER.txt
|
||||
python3 solution.py
|
||||
|
||||
|
5
solution.py
Normal file
5
solution.py
Normal file
@ -0,0 +1,5 @@
|
||||
with open ('values.txt', 'r') as file:
|
||||
with open ('WER_values.txt', 'w') as file_o:
|
||||
for i in file:
|
||||
C, S, D, I = i.strip()
|
||||
file_o.write((S+D+I)/(S+D+C) + '\n')
|
Loading…
Reference in New Issue
Block a user