.finalize_bert_tokens | R Documentation |
Clean and Return BERT Tokens
.finalize_bert_tokens(tokenized_text, token_types, increment_index)
tokenized_text |
A list of integer vectors of token ids. |
token_types |
A list of integer vectors indicating which segment tokens belong to. |
increment_index |
Logical; if TRUE, add 1L to all token ids to convert from the Python-inspired 0-indexed standard to the torch 1-indexed standard. |
An object of class "bert_tokens", which is a list containing a matrix of token ids, a matrix of token type ids, and a matrix of token names.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.