July 2018
Intermediate to advanced
474 pages
13h 37m
English
You are now ready to generate new words, one at a time. First, encode the seed text to integers using the same tokenizer that was used when training the model, which is done using the following code: encoded = tokenizer.texts_to_sequences([seed_text])[0]

prediction = model.predict_classes(encoded, verbose=0)
out_word = '' for word, index in tokenizer.word_index.items(): ...
Read now
Unlock full access