Last active
March 14, 2020 16:33
-
-
Save khuangaf/b5ff454a45061342611a8028f7a1ad3b to your computer and use it in GitHub Desktop.
BERT tokenization
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
tokenizer = BertTokenizer.from_pretrained('bert-base-uncased') | |
tokens = tokenizer.tokenize('Learn Hugging Face Transformers & BERT with PyTorch in 5 Minutes') | |
tokens = ['[CLS]'] + tokens + ['[SEP]'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment