Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why you just select train dataset (TRAIN_PATH) to bulid vocabulary for coding? #67

Open
hoogang opened this issue May 18, 2018 · 0 comments

Comments

@hoogang
Copy link

hoogang commented May 18, 2018

print("Creating vocabulary...")
input_iter = create_csv_iter(TRAIN_PATH)
input_iter = (x[0] + " " + x[1] for x in input_iter)
vocab = create_vocab(input_iter, min_frequency=FLAGS.min_word_frequency)
print("Total vocabulary size: {}".format(len(vocab.vocabulary_)))

Create vocabulary.txt file
write_vocabulary(
vocab, os.path.join(FLAGS.output_dir, "vocabulary.txt"))

Save vocab processor
vocab.save(os.path.join(FLAGS.output_dir, "vocab_processor.bin"))

bulid vocabulary should concern all dataset (train-path,valid_path,test_path)

thanks, hope for your answer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant