parameters: (self, user_dict)
docstring: Add a user defined word to JiebaTokenizer's dictionary.
  
          Args:
              user_dict (Union[str, dict]): One of the two loading methods is file path(str) loading
                  (according to the Jieba dictionary format) and the other is Python dictionary(dict) loading,
                  Python Dict format: {word1:freq1, word2:freq2,...}.
                  Jieba dictionary format : word(required), freq(optional), such as:
  
                  .. code-block::
  
                      word1 freq1
                      word2 None
                      word3 freq3
  
                  Only valid word-freq pairs in user provided file will be added into the dictionary.
                  Rows containing invalid input will be ignored. No error nor warning Status is returned.
  
          Examples:
              >>> from mindspore.dataset.text import JiebaMode
              >>> jieba_hmm_file = "/path/to/jieba/hmm/file"
              >>> jieba_mp_file = "/path/to/jieba/mp/file"
              >>> user_dict = {"男默女泪": 10}
              >>> jieba_op = text.JiebaTokenizer(jieba_hmm_file, jieba_mp_file, mode=JiebaMode.MP)
              >>> jieba_op.add_dict(user_dict)
              >>> text_file_dataset = text_file_dataset.map(operations=jieba_op, input_columns=["text"])
docstring_summary: Add a user defined word to JiebaTokenizer's dictionary.
docstring_tokens: Add a user defined word to JiebaTokenizer s dictionary .
function: def add_dict(self, user_dict):
          """
          Add a user defined word to JiebaTokenizer's dictionary.
  
          Args:
              user_dict (Union[str, dict]): One of the two loading methods is file path(str) loading
                  (according to the Jieba dictionary format) and the other is Python dictionary(dict) loading,
                  Python Dict format: {word1:freq1, word2:freq2,...}.
                  Jieba dictionary format : word(required), freq(optional), such as:
  
                  .. code-block::
  
                      word1 freq1
                      word2 None
                      word3 freq3
  
                  Only valid word-freq pairs in user provided file will be added into the dictionary.
                  Rows containing invalid input will be ignored. No error nor warning Status is returned.
  
          Examples:
              >>> from mindspore.dataset.text import JiebaMode
              >>> jieba_hmm_file = "/path/to/jieba/hmm/file"
              >>> jieba_mp_file = "/path/to/jieba/mp/file"
              >>> user_dict = {"男默女泪": 10}
              >>> jieba_op = text.JiebaTokenizer(jieba_hmm_file, jieba_mp_file, mode=JiebaMode.MP)
              >>> jieba_op.add_dict(user_dict)
              >>> text_file_dataset = text_file_dataset.map(operations=jieba_op, input_columns=["text"])
          """
  
          if isinstance(user_dict, str):
              self.__add_dict_py_file(user_dict)
          elif isinstance(user_dict, dict):
              for k, v in user_dict.items():
                  self.add_word(k, v)
          else:
              raise TypeError("The type of user_dict must str or dict.")
function_tokens: def add_dict ( self , user_dict ) : if isinstance ( user_dict , str ) : self . __add_dict_py_file ( user_dict ) elif isinstance ( user_dict , dict ) : for k , v in user_dict . items ( ) : self . add_word ( k , v ) else : raise TypeError ( "The type of user_dict must str or dict." )