-
-
Save naiaden/e71e44f0c2f17d07f6fe439b19a864aa to your computer and use it in GitHub Desktop.
Get WER, PPL, INS, DEL, SUB
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # full uni | |
| for a in 1; do for l in -50 -20 -10 -5 -4 -3 -2 -1 1 2 3 4 5 10 20 50; do for o in -50 -20 -10 -5 -4 -3 -2 -1 1 2 3 4 5 10 20 50; do mkdir -v /scratch/lonrust/slmout/wat/fulluni-a${a}-l${l}-O${o}; ls -1 /vol/tensusers/lonrust/slm/input/nbest-refs/comp-o | cut -d '.' -f1 | sort -u | parallel --progress --results /scratch/lonrust/slmout/wat/fulluni-a${a}-l${l}-O${o} -j 30 ./asd -i /vol/tensusers/lonrust/speech/comp-o/fulluni --padding -o /scratch/lonrust/slmout/wat/fulluni-a${a}-l${l}-O${o} -r /vol/tensusers/lonrust/slm/input/nbest-refs/comp-o --limit-to {} --debug none -a ${a} -l ${l} -w weighted -m bestinfo --reverse -O ${o}; find /scratch/lonrust/slmout/wat/fulluni-a${a}-l${l}-O${o}/ -name "stdout" | xargs -I {} sh -c 'grep "^fv" {}' > /scratch/lonrust/slmout/wat/fulluni-a${a}-l${l}-O${o}-o.info; done; done; done | |
| echo "ins/del#-50#-20#-10#-5#-4#-3#-2#-1#1#2#3#4#5#10#20#50"; for a in 1; do for l in -50 -20 -10 -5 -4 -3 -2 -1 1 2 3 4 5 10 20 50; do echo -n "$l#"; for o in -50 -20 -10 -5 -4 -3 -2 -1 1 2 3 4 5 10 20 50; do [ -f /scratch/lonrust/slmout/wat/fulluni-a${a}-l${l}-O${o}-o.info ] && echo -n "$(awk '{t+=$5; u+=$7}END{print t/u}' /scratch/lonrust/slmout/wat/fulluni-a${a}-l${l}-O${o}-o.info)#" || echo -n "-\t"; done; echo; done; done | |
| echo "wer#-50#-20#-10#-5#-4#-3#-2#-1#1#2#3#4#5#10#20#50"; for a in 1; do for l in -50 -20 -10 -5 -4 -3 -2 -1 1 2 3 4 5 10 20 50; do echo -n "$l#"; for o in -50 -20 -10 -5 -4 -3 -2 -1 1 2 3 4 5 10 20 50; do [ -f /scratch/lonrust/slmout/wat/fulluni-a${a}-l${l}-O${o}-o.info ] && echo -n "$(awk '{t+=$3}END{print t/NR}' /scratch/lonrust/slmout/wat/fulluni-a${a}-l${l}-O${o}-o.info)#" || echo -n "-\t"; done; echo; done; done | |
| for bom in fullnpref; do for a in 1; do for l in -50 -20 -10 -5 -4 -3 -2 -1 1 2 3 4 5 10 20 50; do for o in -50 -20 -10 -5 -4 -3 -2 -1 1 2 3 4 5 10 20 50; do mkdir -v /scratch/lonrust/slmout/wat/${bom}-a${a}-l${l}-O${o}; ls -1 /vol/tensusers/lonrust/slm/input/nbest-refs/comp-o | cut -d '.' -f1 | sort -u | parallel --progress --results /scratch/lonrust/slmout/wat/${bom}-a${a}-l${l}-O${o} -j 30 ./asd -i /vol/tensusers/lonrust/speech/comp-o/${bom} --padding -o /scratch/lonrust/slmout/wat/${bom}-a${a}-l${l}-O${o} -r /vol/tensusers/lonrust/slm/input/nbest-refs/comp-o --limit-to {} --debug none -a ${a} -l ${l} -w weighted -m bestinfo --reverse -O ${o}; find /scratch/lonrust/slmout/wat/${bom}-a${a}-l${l}-O${o}/ -name "stdout" | xargs -I {} sh -c 'grep "^fv" {}' > /scratch/lonrust/slmout/wat/${bom}-a${a}-l${l}-O${o}-o.info; done; done; done; done | |
| for bom in fullnpref; do echo "ins/del#-50#-20#-10#-5#-4#-3#-2#-1#1#2#3#4#5#10#20#50"; for a in 1; do for l in -50 -20 -10 -5 -4 -3 -2 -1 1 2 3 4 5 10 20 50; do echo -n "$l#"; for o in -50 -20 -10 -5 -4 -3 -2 -1 1 2 3 4 5 10 20 50; do [ -f /scratch/lonrust/slmout/wat/${bom}-a${a}-l${l}-O${o}-o.info ] && echo -n "$(awk '{t+=$5; u+=$7}END{print t/u}' /scratch/lonrust/slmout/wat/${bom}-a${a}-l${l}-O${o}-o.info)#" || echo -n "-\t"; done; echo; done; done; done | |
| for bom in fullnpref; do echo "wer#-50#-20#-10#-5#-4#-3#-2#-1#1#2#3#4#5#10#20#50"; for a in 1; do for l in -50 -20 -10 -5 -4 -3 -2 -1 1 2 3 4 5 10 20 50; do echo -n "$l#"; for o in -50 -20 -10 -5 -4 -3 -2 -1 1 2 3 4 5 10 20 50; do [ -f /scratch/lonrust/slmout/wat/${bom}-a${a}-l${l}-O${o}-o.info ] && echo -n "$(awk '{t+=$3}END{print t/NR}' /scratch/lonrust/slmout/wat/${bom}-a${a}-l${l}-O${o}-o.info)#" || echo -n "-\t"; done; echo; done; done; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment