Re random text generation -- output question

I apologize for being here which is above my pay grade, but I have one simple question and will not bother you again. at the very end of the code:
string_mapped = X[99]
full_string = [n_to_char[value] for value in string_mapped]

generating characters

for i in range(400):
x = np.reshape(string_mapped,(1,len(string_mapped), 1))
x = x / float(len(characters))

pred_index = np.argmax(model.predict(x, verbose=0))
seq = [n_to_char[value] for value in string_mapped]

string_mapped = string_mapped[1:len(string_mapped)]

In [141]:

#combining text
for char in full_string:
txt = txt+char

I want to know how I can print out the random text. I am working with this because the generate() is broken in NLTK.

So far everything in your article works as expected (only tensorflow warnings), but I don’t know how to see the output. {added later: I forgot to say that when I added the #combining text lines at the end [141] I did get an error: name ‘full_string’ is not defined

Thank you very much, and especially for the clarity of your explanations.
Clair Milanovich

© Copyright 2013-2019 Analytics Vidhya