Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
word_index = tokenizer.word_index
test_string = "sports action spy pen camera"
print("word\t\tid")
print("-" * 20)
for word in test_string.split():
print("%s\t\t%s" % (word, word_index[word]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment