if word_level:
text = prefix.split() if prefix else [""]
else:
text = list(prefix) if prefix else [""]
max_gen_length += maxlen
else:
if word_level:
After Change
if word_level and prefix:
punct = "!"//$%&()*+,-./:;<=>?@[\]^_`{|}~\\n\\t\"‘’“”’–—"
prefix = re.sub("([{}])".format(punct), r" \1 ", prefix)
prefix_t = [x.lower() for x in prefix.split()]
if not word_level and prefix:
prefix_t = list(prefix)