class_docstr: Reaction Featurizer.
  
  RxnFeaturizer is a wrapper class for HuggingFace's RobertaTokenizerFast,
  that is intended for featurizing chemical reaction datasets. The featurizer
  computes the source and target required for a seq2seq task and applies the
  RobertaTokenizer on them separately. Additionally, it can also separate or
  mix the reactants and reagents before tokenizing.
  
  Examples
  --------
  >>> from deepchem.feat import RxnFeaturizer
  >>> from transformers import RobertaTokenizerFast
  >>> tokenizer = RobertaTokenizerFast.from_pretrained("seyonec/PubChem10M_SMILES_BPE_450k")
  >>> featurizer = RxnFeaturizer(tokenizer, sep_reagent=True)
  >>> feats = featurizer.featurize(['CCS(=O)(=O)Cl.OCCBr>CCN(CC)CC.CCOCC>CCS(=O)(=O)OCCBr'])
  
  Notes
  -----
  - The featurize method expects a List of reactions.
  - Use the sep_reagent toggle to enable/disable reagent separation.
      - True - Separate the reactants and reagents
      - False - Mix the reactants and reagents
docstr: Initialize a ReactionFeaturizer object.
  
  Parameters
  ----------
  tokenizer: RobertaTokenizerFast
      HuggingFace Tokenizer to be used for featurization.
  sep_reagent: bool
      Toggle to separate or mix the reactants and reagents.
  max_length: int, default 100
      Maximum length of padding
docstr_tok: ["Initialize","a","ReactionFeaturizer","object",".","Parameters","--","--","--","--","--","tokenizer",":","RobertaTokenizerFast","HuggingFace","Tokenizer","to","be","used","for","featurization",".","sep_reagent",":","bool","Toggle","to","separate","or","mix","the","reactants","and","reagents",".","max_length",":","int",",","default","100","Maximum","length","of","padding"]
code: def __init__(
      self,
      tokenizer: RobertaTokenizerFast,
      sep_reagent: bool,
      max_length: int = 100,
  ):
      """Initialize a ReactionFeaturizer object.
  
      Parameters
      ----------
      tokenizer: RobertaTokenizerFast
          HuggingFace Tokenizer to be used for featurization.
      sep_reagent: bool
          Toggle to separate or mix the reactants and reagents.
      max_length: int, default 100
          Maximum length of padding
      """
      if not isinstance(tokenizer, RobertaTokenizerFast):
          raise TypeError(
              f"""`tokenizer` must be a constructed `RobertaTokenizerFast`
                  object, not {type(tokenizer)}"""
          )
      else:
          self.tokenizer = tokenizer
      self.sep_reagent = sep_reagent
      self.max_length = max_length
  
file_path: deepchem/deepchem/feat/reaction_featurizer.py
imports: from deepchem.feat import Featurizer
  from typing import List
  import numpy
  from numpy.typing import ArrayLike
label_desc: Use image node_id 1 to create a new RxnFeaturizer object from inherited base classes: Featurizer with example: obj = RxnFeaturizer(tokenizer, sep_reagent, max_length)