Spaces:
Runtime error
Runtime error
File size: 740 Bytes
e50fe35 |
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 |
#!/bin/bash
expdir=$1 # EXPDIR
#`dirname $0`/env.sh
SUBWORD_NMT_DIR="subword-nmt"
data_dir="$expdir/data"
train_file=$data_dir/train
bpe_file=$expdir/bpe/train/train
mkdir -p $expdir/bpe/train
echo "Apply to SRC corpus"
python $SUBWORD_NMT_DIR/subword_nmt/apply_bpe.py \
-c $expdir/vocab/bpe_codes.32k.SRC_TGT \
--vocabulary $expdir/vocab/vocab.SRC \
--vocabulary-threshold 5 \
--num-workers "-1" \
< $train_file.SRC \
> $bpe_file.SRC
echo "Apply to TGT corpus"
python $SUBWORD_NMT_DIR/subword_nmt/apply_bpe.py \
-c $expdir/vocab/bpe_codes.32k.SRC_TGT \
--vocabulary $expdir/vocab/vocab.TGT \
--vocabulary-threshold 5 \
--num-workers "-1" \
< $train_file.TGT \
> $bpe_file.TGT
|