-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpreprocess.sh
30 lines (21 loc) · 981 Bytes
/
preprocess.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
#!/bin/bash
# In Nomine Functions Team
# distributed under license: GPL 3 License http://www.gnu.org/licenses/
DATA_FOLDER=data/ubuntu_all_data/
TRAIN_SRC=$DATA_FOLDER/ubuntu_ds_train.asm
TRAIN_TGT=$DATA_FOLDER/ubuntu_ds_train.name
VALID_SRC=$DATA_FOLDER/ubuntu_ds_validation.asm
VALID_TGT=$DATA_FOLDER/ubuntu_ds_validation.name
VOCAB_SOURCE=$DATA_FOLDER/asm_vocabulary.txt
VOCAB_TARGET=$DATA_FOLDER/name_vocabulary.txt
PREPROCESSED_FOLDER=data/preprocessed_ubuntu_dataset/
python OpenNMT-py/preprocess.py -train_src $TRAIN_SRC -train_tgt $TRAIN_TGT \
-valid_src $VALID_SRC -valid_tgt $VALID_TGT \
-save_data $PREPROCESSED_FOLDER/ubuntu_dataset_preprocessed \
-src_vocab_size 200000 \
-tgt_vocab_size 2000 \
-num_threads 10 \
-min_src_length 5 -min_tgt_length 1 \
-src_seq_length_trunc 500 --tgt_seq_length_trunc 10 \
-shard_size 50000 \
-report_every 10000