class_docstr: Creates the SmilesTokenizer class. The tokenizer heavily inherits from the BertTokenizer
  implementation found in Huggingface's transformers library. It runs a WordPiece tokenization
  algorithm over SMILES strings using the tokenisation SMILES regex developed by Schwaller et. al.
  
  Please see https://github.com/huggingface/transformers
  and https://github.com/rxn4chemistry/rxnfp for more details.
  
  Examples
  --------
  >>> from deepchem.feat.smiles_tokenizer import SmilesTokenizer
  >>> current_dir = os.path.dirname(os.path.realpath(__file__))
  >>> vocab_path = os.path.join(current_dir, 'tests/data', 'vocab.txt')
  >>> tokenizer = SmilesTokenizer(vocab_path)
  >>> print(tokenizer.encode("CC(=O)OC1=CC=CC=C1C(=O)O"))
  [12, 16, 16, 17, 22, 19, 18, 19, 16, 20, 22, 16, 16, 22, 16, 16, 22, 16, 20, 16, 17, 22, 19, 18, 19, 13]
  
  
  References
  ----------
  .. [1] Schwaller, Philippe; Probst, Daniel; Vaucher, Alain C.; Nair, Vishnu H; Kreutter, David;
      Laino, Teodoro; et al. (2019): Mapping the Space of Chemical Reactions using Attention-Based Neural
      Networks. ChemRxiv. Preprint. https://doi.org/10.26434/chemrxiv.9897365.v3
  
  Note
  ----
  This class requires huggingface's transformers and tokenizers libraries to be installed.
class_docstr_tok: ["Creates","the","SmilesTokenizer","class",".","The","tokenizer","heavily","inherits","from","the","BertTokenizer","implementation","found","in","Huggingface","'s","transformers","library",".","It","runs","a","WordPiece","tokenization","algorithm","over","SMILES","strings","using","the","tokenisation","SMILES","regex","developed","by","Schwaller","et",".","al",".","Please","see","https",":","\/\/github.com\/huggingface\/transformers","and","https",":","\/\/github.com\/rxn4chemistry\/rxnfp","for","more","details",".","Examples","--","--","--","--",">",">",">","from","deepchem.feat.smiles_tokenizer","import","SmilesTokenizer",">",">",">","current_dir","=","os.path.dirname","(","os.path.realpath","(","__file__",")",")",">",">",">","vocab_path","=","os.path.join","(","current_dir",",","'tests\/data","'",",","'vocab.txt","'",")",">",">",">","tokenizer","=","SmilesTokenizer","(","vocab_path",")",">",">",">","print","(","tokenizer.encode","(","``","CC","(","=O",")","OC1=CC=CC=C1C","(","=O",")","O","''",")",")","[","12",",","16",",","16",",","17",",","22",",","19",",","18",",","19",",","16",",","20",",","22",",","16",",","16",",","22",",","16",",","16",",","22",",","16",",","20",",","16",",","17",",","22",",","19",",","18",",","19",",","13","]","References","--","--","--","--","--","..","[","1","]","Schwaller",",","Philippe",";","Probst",",","Daniel",";","Vaucher",",","Alain","C.",";","Nair",",","Vishnu","H",";","Kreutter",",","David",";","Laino",",","Teodoro",";","et","al",".","(","2019",")",":","Mapping","the","Space","of","Chemical","Reactions","using","Attention-Based","Neural","Networks",".","ChemRxiv",".","Preprint",".","https",":","\/\/doi.org\/10.26434\/chemrxiv.9897365.v3","Note","--","--","This","class","requires","huggingface","'s","transformers","and","tokenizers","libraries","to","be","installed","."]
docstr: Converts an index (integer) in a token (string/unicode) using the vocab.
  
  Parameters
  ----------
  index: int
      Integer index to be converted back to a string-based token as part of a larger sequence.
docstr_tok: ["Converts","an","index","(","integer",")","in","a","token","(","string\/unicode",")","using","the","vocab",".","Parameters","--","--","--","--","--","index",":","int","Integer","index","to","be","converted","back","to","a","string-based","token","as","part","of","a","larger","sequence","."]
code: def _convert_id_to_token(self, index: int):
      """Converts an index (integer) in a token (string/unicode) using the vocab.
  
      Parameters
      ----------
      index: int
          Integer index to be converted back to a string-based token as part of a larger sequence.
      """
  
      return self.ids_to_tokens.get(index, self.unk_token)
  
imports: import collections
  import os
  import re
  import pkg_resources
  from typing import List, Optional
  from transformers import BertTokenizer
  from logging import getLogger
label_desc: Use image node_id 6 for calling the SmilesTokenizer obj's underlying member method code with example usage: obj._convert_id_to_token(index) and returns: self