Created
July 17, 2020 14:55
-
-
Save prateekjoshi565/9a6d3138e1c43cef3db98909800a0377 to your computer and use it in GitHub Desktop.
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
# tokenize and encode sequences in the training set | |
tokens_train = tokenizer.batch_encode_plus( | |
train_text.tolist(), | |
max_length = 25, | |
pad_to_max_length=True, | |
truncation=True | |
) | |
# tokenize and encode sequences in the validation set | |
tokens_val = tokenizer.batch_encode_plus( | |
val_text.tolist(), | |
max_length = 25, | |
pad_to_max_length=True, | |
truncation=True | |
) | |
# tokenize and encode sequences in the test set | |
tokens_test = tokenizer.batch_encode_plus( | |
test_text.tolist(), | |
max_length = 25, | |
pad_to_max_length=True, | |
truncation=True | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment