-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcopyrest.sh
executable file
·238 lines (186 loc) · 6.37 KB
/
copyrest.sh
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
#!/bin/bash
NUMBERS="2 3 4 6 7 8 9 10"
for number in `echo $NUMBERS`
do
TOPICNO=$number
##Copying tuning and testing files for Multiple Topics##
echo "Copying tuning and testing files for topic $TOPICNO"
cd K$TOPICNO
cd moses_health_topicModel_HE
cd corpus
cp ../../../health/tun.* .
cp ../../../health/test.* .
cd ..
rm sample_moses_params.conf
touch sample_moses_params.conf
echo "
# All paths must be absolute paths
# workspace directory where the intermediate and output files will be created
# required
WORKSPACE_DIR=\"$PWD/workspace\"
# parallel corpus directory path : must be absolute path
# required
parallel_corpus=\"$PWD/corpus\"
# parallel corpus description
# optional
parallel_corpus_desc=\"English - Hindi\"
# target language corpus
# optional: BUT required if language model has not already been created
monolingual_corpus=\"/home/development/diptesh/IndianTopicMT/hindimonolingual.tokenized.withILCIhealth\"
# target language corpus description
# optional
monolingual_corpus_desc=\"Hindi Monolingual Cleaned Corpus\"
# target language - language model
# required
target_lm=\"/home/development/diptesh/IndianTopicMT/hindi_monolingual.lm\"
# source language
# required
SRC_LANG=\"en\"
# target language
# required
TGT_LANG=\"hi\"
# SRILM options
SRILM_OPTS=\"-tolower -order 5 -interpolate -kndiscount -text $monolingual_corpus -lm $target_lm\"
# Moses training script option ( train-model.perl )
TRAIN_MODEL_OPTS=\"-alignment grow-diag-final-and -reordering msd-bidirectional-fe -lm 0:5:$target_lm:0 -mgiza -mgiza-cpus 12\"
# Moses decoder options
MOSES_DECODER_OPTS=\"-threads 8\"
# MERT training options
MERT_OPTS=\"--decoder-flags='-threads 8'\"
" >> sample_moses_params.conf
cd ../../
cd K$TOPICNO
cd moses_health_topicModel_cartesian_HE
cd corpus
cp ../../../health/tun.* .
cp ../../../health/test.* .
cd ..
rm sample_moses_params.conf
touch sample_moses_params.conf
echo "
# All paths must be absolute paths
# workspace directory where the intermediate and output files will be created
# required
WORKSPACE_DIR=\"$PWD/workspace\"
# parallel corpus directory path : must be absolute path
# required
parallel_corpus=\"$PWD/corpus\"
# parallel corpus description
# optional
parallel_corpus_desc=\"English - Hindi\"
# target language corpus
# optional: BUT required if language model has not already been created
monolingual_corpus=\"/home/development/diptesh/IndianTopicMT/hindimonolingual.tokenized.withILCIhealth\"
# target language corpus description
# optional
monolingual_corpus_desc=\"Hindi Monolingual Cleaned Corpus\"
# target language - language model
# required
target_lm=\"/home/development/diptesh/IndianTopicMT/hindi_monolingual.lm\"
# source language
# required
SRC_LANG=\"en\"
# target language
# required
TGT_LANG=\"hi\"
# SRILM options
SRILM_OPTS=\"-tolower -order 5 -interpolate -kndiscount -text $monolingual_corpus -lm $target_lm\"
# Moses training script option ( train-model.perl )
TRAIN_MODEL_OPTS=\"-alignment grow-diag-final-and -reordering msd-bidirectional-fe -lm 0:5:$target_lm:0 -mgiza -mgiza-cpus 12\"
# Moses decoder options
MOSES_DECODER_OPTS=\"-threads 8\"
# MERT training options
MERT_OPTS=\"--decoder-flags='-threads 8'\"
" >> sample_moses_params.conf
cd ../../
cd K$TOPICNO
cd moses_tourism_topicModel_HE
cd tourism_HE
cp ../../../tourism/tun.* .
cp ../../../tourism/test.* .
cd ..
rm sample_moses_params.conf
touch sample_moses_params.conf
echo "
# All paths must be absolute paths
# workspace directory where the intermediate and output files will be created
# required
WORKSPACE_DIR=\"$PWD/workspace\"
# parallel corpus directory path : must be absolute path
# required
parallel_corpus=\"$PWD/corpus\"
# parallel corpus description
# optional
parallel_corpus_desc=\"English - Hindi\"
# target language corpus
# optional: BUT required if language model has not already been created
monolingual_corpus=\"/home/development/diptesh/IndianTopicMT/hindimonolingual.tokenized.withILCIhealth\"
# target language corpus description
# optional
monolingual_corpus_desc=\"Hindi Monolingual Cleaned Corpus\"
# target language - language model
# required
target_lm=\"/home/development/diptesh/IndianTopicMT/hindi_monolingual.lm\"
# source language
# required
SRC_LANG=\"en\"
# target language
# required
TGT_LANG=\"hi\"
# SRILM options
SRILM_OPTS=\"-tolower -order 5 -interpolate -kndiscount -text $monolingual_corpus -lm $target_lm\"
# Moses training script option ( train-model.perl )
TRAIN_MODEL_OPTS=\"-alignment grow-diag-final-and -reordering msd-bidirectional-fe -lm 0:5:$target_lm:0 -mgiza -mgiza-cpus 12\"
# Moses decoder options
MOSES_DECODER_OPTS=\"-threads 8\"
# MERT training options
MERT_OPTS=\"--decoder-flags='-threads 8'\"
" >> sample_moses_params.conf
cd ../../
cd K$TOPICNO
cd moses_tourism_topicModel_cartesian_HE
cd tourism_HE
cp ../../../tourism/tun.* .
cp ../../../tourism/test.* .
cd ..
rm sample_moses_params.conf
touch sample_moses_params.conf
echo "
# All paths must be absolute paths
# workspace directory where the intermediate and output files will be created
# required
WORKSPACE_DIR=\"$PWD/workspace\"
# parallel corpus directory path : must be absolute path
# required
parallel_corpus=\"$PWD/corpus\"
# parallel corpus description
# optional
parallel_corpus_desc=\"English - Hindi\"
# target language corpus
# optional: BUT required if language model has not already been created
monolingual_corpus=\"/home/development/diptesh/IndianTopicMT/hindimonolingual.tokenized.withILCIhealth\"
# target language corpus description
# optional
monolingual_corpus_desc=\"Hindi Monolingual Cleaned Corpus\"
# target language - language model
# required
target_lm=\"/home/development/diptesh/IndianTopicMT/hindi_monolingual.lm\"
# source language
# required
SRC_LANG=\"en\"
# target language
# required
TGT_LANG=\"hi\"
# SRILM options
SRILM_OPTS=\"-tolower -order 5 -interpolate -kndiscount -text $monolingual_corpus -lm $target_lm\"
# Moses training script option ( train-model.perl )
TRAIN_MODEL_OPTS=\"-alignment grow-diag-final-and -reordering msd-bidirectional-fe -lm 0:5:$target_lm:0 -mgiza -mgiza-cpus 12\"
# Moses decoder options
MOSES_DECODER_OPTS=\"-threads 8\"
# MERT training options
MERT_OPTS=\"--decoder-flags='-threads 8'\"
" >> sample_moses_params.conf
cd ../../
done
echo
exit 0