Skip to content

Commit

Permalink
[egs] Small bug fixes for IAM and UW3 recipes (#3048)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChunChiehChang authored and danpovey committed Feb 21, 2019
1 parent f09d48a commit b0fc09d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion egs/iam/v1/local/train_lm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ if [ $stage -le 0 ]; then
# Using LOB and brown corpus.
if [ ! -f data/local/lob-train-only.txt ]; then
cat data/local/lobcorpus/0167/download/LOB_COCOA/lob.txt | \
local/remove_test_utterances_from_lob.py data/test/text.old data/val/text.old \
local/remove_test_utterances_from_lob.py data/test/text data/val/text \
> data/local/lob-train-only.txt
fi
cat data/local/lob-train-only.txt > ${dir}/data/text/lob.txt
Expand Down
6 changes: 3 additions & 3 deletions egs/uw3/v1/local/process_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@
# The dataset is randomly split train 95% and test 5%
coin = random.randint(0, 20)
if coin >= 1:
train_text_fh.write(utt_id + ' ' + text + '\n')
train_text_fh.write("{} {}\n".format(utt_id, text))
train_utt2spk_fh.write("{} {}\n".format(utt_id, page_count))
train_image_fh.write("{} {}\n".format(utt_id, image_path)
train_image_fh.write("{} {}\n".format(utt_id, image_path))
elif coin < 1:
test_text_fh.write("{} {}\n".format(utt_id, text))
test_utt2spk_fh.write("{} {}\n".format(utt_id, page_count))
train_image_fh.write("{} {}\n".format(utt_id, image_path)
train_image_fh.write("{} {}\n".format(utt_id, image_path))

0 comments on commit b0fc09d

Please sign in to comment.