-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathscaling_test
More file actions
executable file
·31 lines (27 loc) · 841 Bytes
/
scaling_test
File metadata and controls
executable file
·31 lines (27 loc) · 841 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
dataset="fisher_test"
epochs=30
alpha=1
weight=1
WC_OUT="$(wc -l data/fisher-callhome/corpus/ldc/${dataset}.es.nopunc.lower)"
for token in $WC_OUT; do
SIZE=$token
break
done
CUTS=10
DIFF=$((SIZE/CUTS))
# The number of sentences per minute
callhome_rate=$((20875/(20*60)))
for ((i=0;i<CUTS;i++)); do
num_sents=$((SIZE-i*DIFF))
printf "%b\t" $((num_sents/callhome_rate))
#./run $dataset $epochs $alpha $weight $num_sents
#./wer $dataset $epochs $alpha $weight $num_sents
./run_giza $dataset $num_sents
./decode_giza $dataset $num_sents > data/out/giza-pp/${dataset}.n${num_sents}.es
python ../nlp/per.py \
--ref data/fisher-callhome/corpus/ldc/${dataset}.es.nopunc.lower \
--hypo data/out/giza-pp/${dataset}.n${num_sents}.es
done
#./run $dataset $epochs $alpha $weight 0
#./wer $dataset $epochs $alpha $weight 0