|
|
@ -7,17 +7,18 @@ stop_stage=100
|
|
|
|
nbpe=8000
|
|
|
|
nbpe=8000
|
|
|
|
bpemode=unigram
|
|
|
|
bpemode=unigram
|
|
|
|
bpeprefix="data/bpe_${bpemode}_${nbpe}"
|
|
|
|
bpeprefix="data/bpe_${bpemode}_${nbpe}"
|
|
|
|
DATA_DIR=
|
|
|
|
data_dir=/mnt/dataset/TED_EnZh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
source ${MAIN_ROOT}/utils/parse_options.sh
|
|
|
|
source ${MAIN_ROOT}/utils/parse_options.sh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mkdir -p data
|
|
|
|
|
|
|
|
TARGET_DIR=${MAIN_ROOT}/examples/dataset
|
|
|
|
TARGET_DIR=${MAIN_ROOT}/examples/dataset
|
|
|
|
mkdir -p ${TARGET_DIR}
|
|
|
|
mkdir -p ${TARGET_DIR}
|
|
|
|
|
|
|
|
mkdir -p data
|
|
|
|
|
|
|
|
|
|
|
|
if [ ! -d ${SOURCE_DIR} ]; then
|
|
|
|
|
|
|
|
|
|
|
|
if [ ${stage} -le -1 ] && [ ${stop_stage} -ge -1 ]; then
|
|
|
|
|
|
|
|
if [ ! -e ${data_dir} ]; then
|
|
|
|
echo "Error: Dataset is not avaiable. Please download and unzip the dataset"
|
|
|
|
echo "Error: Dataset is not avaiable. Please download and unzip the dataset"
|
|
|
|
echo "Download Link: https://pan.baidu.com/s/18L-59wgeS96WkObISrytQQ Passwd: bva0"
|
|
|
|
echo "Download Link: https://pan.baidu.com/s/18L-59wgeS96WkObISrytQQ Passwd: bva0"
|
|
|
|
echo "The tree of the directory should be:"
|
|
|
|
echo "The tree of the directory should be:"
|
|
|
@ -33,11 +34,10 @@ if [ ! -d ${SOURCE_DIR} ]; then
|
|
|
|
exit 1
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if [ ${stage} -le -1 ] && [ ${stop_stage} -ge -1 ]; then
|
|
|
|
|
|
|
|
# generate manifests
|
|
|
|
# generate manifests
|
|
|
|
python3 ${TARGET_DIR}/ted_en_zh/ted_en_zh.py \
|
|
|
|
python3 ${TARGET_DIR}/ted_en_zh/ted_en_zh.py \
|
|
|
|
--manifest_prefix="data/manifest" \
|
|
|
|
--manifest_prefix="data/manifest" \
|
|
|
|
--src_dir="${DATA_DIR}"
|
|
|
|
--src_dir="${data_dir}"
|
|
|
|
|
|
|
|
|
|
|
|
echo "Complete raw data pre-process."
|
|
|
|
echo "Complete raw data pre-process."
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|