class_docstr: Trie in Python. Creates a Trie out of a list of words. The trie is used to split on `added_tokens` in one pass
  Loose reference https://en.wikipedia.org/wiki/Trie
class_docstr_tok: ["Trie","in","Python",".","Creates","a","Trie","out","of","a","list","of","words",".","The","trie","is","used","to","split","on","`","added_tokens","`","in","one","pass","Loose","reference","https",":","\/\/en.wikipedia.org\/wiki\/Trie"]
docstr: Passes over every char (utf-8 char) on word and recursively adds it to the internal `data` trie representation.
  The special key `""` is used to represent termination.
  
  This function is idempotent, adding twice the same word will leave the trie unchanged
  
  Example:
  
  ```python
  >>> trie = Trie()
  >>> trie.add("Hello 友達")
  >>> trie.data
  {"H": {"e": {"l": {"l": {"o": {" ": {"友": {"達": {"": 1}}}}}}}}}
  
  >>> trie.add("Hello")
  >>> trie.data
  {"H": {"e": {"l": {"l": {"o": {"": 1, " ": {"友": {"達": {"": 1}}}}}}}}}
  ```
docstr_tok: ["Passes","over","every","char","(","utf-8","char",")","on","word","and","recursively","adds","it","to","the","internal","`","data","`","trie","representation",".","The","special","key","`","``","''","`","is","used","to","represent","termination",".","This","function","is","idempotent",",","adding","twice","the","same","word","will","leave","the","trie","unchanged","Example",":","``","`","python",">",">",">","trie","=","Trie","(",")",">",">",">","trie.add","(","``","Hello","\u53cb\u9054","''",")",">",">",">","trie.data","{","``","H","''",":","{","``","e","''",":","{","``","l","''",":","{","``","l","''",":","{","``","o","''",":","{","``","``",":","{","``","\u53cb","''",":","{","``","\u9054","''",":","{","``","''",":","1","}","}","}","}","}","}","}","}","}",">",">",">","trie.add","(","``","Hello","''",")",">",">",">","trie.data","{","``","H","''",":","{","``","e","''",":","{","``","l","''",":","{","``","l","''",":","{","``","o","''",":","{","``","''",":","1",",","``","``",":","{","``","\u53cb","''",":","{","``","\u9054","''",":","{","``","''",":","1","}","}","}","}","}","}","}","}","}","``","`"]
code: def add(self, word: str):
      """
      Passes over every char (utf-8 char) on word and recursively adds it to the internal `data` trie representation.
      The special key `""` is used to represent termination.
  
      This function is idempotent, adding twice the same word will leave the trie unchanged
  
      Example:
  
      ```python
      >>> trie = Trie()
      >>> trie.add("Hello 友達")
      >>> trie.data
      {"H": {"e": {"l": {"l": {"o": {" ": {"友": {"達": {"": 1}}}}}}}}}
  
      >>> trie.add("Hello")
      >>> trie.data
      {"H": {"e": {"l": {"l": {"o": {"": 1, " ": {"友": {"達": {"": 1}}}}}}}}}
      ```
      """
      if not word:
          # Prevent empty string
          return
      ref = self.data
      for char in word:
          ref[char] = char in ref and ref[char] or {}
          ref = ref[char]
      ref[""] = 1
  
imports: import bisect
  import itertools
  import re
  import unicodedata
  from collections import OrderedDict
  from typing import Any, Dict, List, Optional, Tuple, Union, overload
  from .tokenization_utils_base import ENCODE_KWARGS_DOCSTRING, ENCODE_PLUS_ADDITIONAL_KWARGS_DOCSTRING, INIT_TOKENIZER_DOCSTRING, AddedToken, BatchEncoding, EncodedInput, EncodedInputPair, PreTokenizedInput, PreTokenizedInputPair, PreTrainedTokenizerBase, TextInput, TextInputPair, TruncationStrategy
  from .utils import PaddingStrategy, TensorType, add_end_docstrings, logging
label_desc: Use image node_id 2 for calling the Trie obj's underlying member method code with example usage: obj.add(word) without return types