Created
January 18, 2019 05:50
-
-
Save MLWhiz/7f867da58aa20b50e724c12b89950fc9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| from keras.preprocessing.text import Tokenizer | |
| ## Tokenize the sentences | |
| tokenizer = Tokenizer(num_words=max_features) | |
| tokenizer.fit_on_texts(list(train_X)+list(test_X)) | |
| train_X = tokenizer.texts_to_sequences(train_X) | |
| test_X = tokenizer.texts_to_sequences(test_X) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment