class_docstr: Functor for parsing raw strings into list of int tokens.
  
  Examples:
      >>> parser = CharParser(['a', 'b', 'c'])
      >>> parser('abc')
      [0, 1, 2]
class_docstr_tok: ["Functor","for","parsing","raw","strings","into","list","of","int","tokens",".","Examples",":",">",">",">","parser","=","CharParser","(","[","'","a","'",",","'","b","'",",","'","c","'","]",")",">",">",">","parser","(","'abc","'",")","[","0",",","1",",","2","]"]
code: def _tokenize(self, text: str) -> List[int]:
      tokens = []
      # Split by word for find special labels.
      for word_id, word in enumerate(text.split(" ")):
          if (
              word_id != 0
          ):  # Not first word - so we insert space before.
              tokens.append(self._labels_map.get(" ", self._unk_id))
  
          if word in self._special_labels:
              tokens.append(self._labels_map[word])
              continue
  
          for char in word:
              tokens.append(self._labels_map.get(char, self._unk_id))
  
      # If unk_id == blank_id, OOV tokens are removed.
      tokens = [token for token in tokens if token != self._blank_id]
  
      return tokens
  
file_path: NeMo/nemo/collections/common/parts/preprocessing/parsers.py
imports: import string
  from typing import List, Optional
  from nemo.collections.common.parts.preprocessing import cleaners
label_desc: Use image node_id 4 for calling the CharParser obj's underlying member method code with example usage: obj._tokenize(text) and returns: tokens