Closed nshmyrev closed 8 years ago
create_vocabulary(ph_vocab_path, train_ph) create_vocabulary(gr_vocab_path, train_gr) # Initialize vocabularies. ph_vocab = initialize_vocabulary(ph_vocab_path, False) gr_vocab = initialize_vocabulary(gr_vocab_path, False)
Why do you need to initialize the vocabulary after you created it. Logic must be more straightforward. First initialize the vocabulary, then save it, then there is no need to reload it again.
Save must be separate
create_vocabulary should create a vocabulary, not a list
save_vocabulary should save vocabulary, not a list
Why do you need to initialize the vocabulary after you created it. Logic must be more straightforward. First initialize the vocabulary, then save it, then there is no need to reload it again.