class_docstr: Roberta Featurizer.
  
  The Roberta Featurizer is a wrapper class of the Roberta Tokenizer,
  which is used by Huggingface's transformers library for tokenizing large corpuses for Roberta Models.
  Please confirm the details in [1]_.
  
  Please see https://github.com/huggingface/transformers
  and https://github.com/seyonechithrananda/bert-loves-chemistry for more details.
  
  Examples
  --------
  >>> from deepchem.feat import RobertaFeaturizer
  >>> smiles = ["Cn1c(=O)c2c(ncn2C)n(C)c1=O", "CC(=O)N1CN(C(C)=O)C(O)C1O"]
  >>> featurizer = RobertaFeaturizer.from_pretrained("seyonec/SMILES_tokenized_PubChem_shard00_160k")
  >>> out = featurizer(smiles, add_special_tokens=True, truncation=True)
  
  References
  ----------
  .. [1] Chithrananda, Seyone, Grand, Gabriel, and Ramsundar, Bharath (2020): "Chemberta: Large-scale self-supervised
      pretraining for molecular property prediction." arXiv. preprint. arXiv:2010.09885.
  
  
  Note
  -----
  This class requires transformers to be installed.
  RobertaFeaturizer uses dual inheritance with RobertaTokenizerFast in Huggingface for rapid tokenization,
  as well as DeepChem's MolecularFeaturizer class.
docstr: Calculate encoding using HuggingFace's RobertaTokenizerFast
  
  Parameters
  ----------
  sequence: str
      Arbitrary string sequence to be tokenized.
  
  Returns
  -------
  datapoint: List
      List containing two lists; the `input_ids` and the `attention_mask`
docstr_tok: ["Calculate","encoding","using","HuggingFace","'s","RobertaTokenizerFast","Parameters","--","--","--","--","--","sequence",":","str","Arbitrary","string","sequence","to","be","tokenized",".","Returns","--","--","--","-","datapoint",":","List","List","containing","two","lists",";","the","`","input_ids","`","and","the","`","attention_mask","`"]
code: def _featurize(self, datapoint: str, **kwargs) -> List[List[int]]:
      """Calculate encoding using HuggingFace's RobertaTokenizerFast
  
      Parameters
      ----------
      sequence: str
          Arbitrary string sequence to be tokenized.
  
      Returns
      -------
      datapoint: List
          List containing two lists; the `input_ids` and the `attention_mask`
      """
  
      # the encoding is natively a dictionary with keys 'input_ids' and 'attention_mask'
      encoding = list(self(datapoint, **kwargs).values())
      return encoding
  
file_path: deepchem/deepchem/feat/roberta_tokenizer.py
imports: from deepchem.feat import Featurizer
  from typing import Dict, List
label_desc: Use image node_id 2 for calling the RobertaFeaturizer obj's underlying member method code with example usage: obj._featurize(datapoint) and returns: encoding