Skip to content

Instantly share code, notes, and snippets.

@prateekjoshi565
Created February 6, 2019 10:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prateekjoshi565/62f5c78ebcc5827714aba42b0a987c74 to your computer and use it in GitHub Desktop.
Save prateekjoshi565/62f5c78ebcc5827714aba42b0a987c74 to your computer and use it in GitHub Desktop.
Integer to word mapping
def get_word(n, tokenizer):
for word, index in tokenizer.word_index.items():
if index == n:
return word
return None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment