Created
September 1, 2020 03:14
-
-
Save rishisidhu/9c3b10b632b89a14b22367bd4a07d675 to your computer and use it in GitHub Desktop.
What happens when Python tokenizer comes across new words
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
# Unseen Words | |
test_data = [ | |
'Grapes are sour but oranges are sweet', | |
] | |
test_seq = myTokenizer.texts_to_sequences(test_data) | |
print("\nTest Sequence = ", test_seq, " => ", [x for x in myTokenizer.sequences_to_texts_generator(test_seq)]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment