if options.promptsfn:
with codecs.open(options.promptsfn, "r", "utf8") as promptsf:
for line in promptsf:
prompt_tokens.extend(tokenize(line, lang=options.lang))
logging.info("%s read. %d tokens." % (options.promptsfn, len(prompt_tokens)))
//
After Change
with codecs.open(options.wrt, "r", "utf8") as wrtf:
for line in wrtf:
parts = line.strip().split("")
if len(parts) != 2:
continue
wrt[parts[0]] = parts[1]