'No values is coming during tokenizing (texts_to_sequence) [closed]
from tensorflow.keras.preprocessing.text import Tokenizer
from tensorflow.keras.preprocessing.sequence import pad_sequences
test_sentence1 = "This is the worst flight experience of my life!"
tokenizer = Tokenizer(num_words=5000)
sequences = tokenizer.texts_to_sequences([test_sentence1])
print(sequences)
text = pad_sequences(sequences, maxlen=200)
print(text)
Output: sequences --> [[]]
There is no output is coming when I tokenize with text_to_sequence.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
