Skip to content

Instantly share code, notes, and snippets.

@prateekjoshi565
Created June 27, 2020 09:03
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save prateekjoshi565/a6a446f35fd5ccc6410f1dff0adc15cc to your computer and use it in GitHub Desktop.
# encode pre-tokenized text string
encoded_output_2 = tokenizer.encode(sentence.split(), is_pretokenized=True)
print(encoded_output_2.tokens)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment