Created
February 6, 2019 10:01
-
-
Save prateekjoshi565/62f5c78ebcc5827714aba42b0a987c74 to your computer and use it in GitHub Desktop.
Integer to word mapping
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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