Created
August 24, 2023 10:12
-
-
Save pythonlessons/6c30f00a4a7e95998a1e43f2863a3df1 to your computer and use it in GitHub Desktop.
transformers_nlp_data
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
tokenized_sentence = detokenizer.texts_to_sequences(["Hello world, how are you?"])[0] | |
print(tokenized_sentence) | |
detokenized_sentence = detokenizer.detokenize([tokenized_sentence], remove_start_end=False) | |
print(detokenized_sentence) | |
detokenized_sentence = detokenizer.detokenize([tokenized_sentence]) | |
print(detokenized_sentence) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment