parameters: (self, text)
docstring: Generates a dictionary of contiguous numbers to encode the text.
          Args:
              text: input string text
docstring_summary: Generates a dictionary of contiguous numbers to encode the text.
          Args:
              text: input string text
docstring_tokens: Generates a dictionary of contiguous numbers to encode the text . Args : text : input string text
function: def gen_dict(self, text):
          """
          Generates a dictionary of contiguous numbers to encode the text.
          Args:
              text: input string text
          """
          self.enc_dict = {}
          self.dec_dict = []
          for t in sorted(text):
              if t not in self.enc_dict:
                  self.enc_dict[t] = len(self.dec_dict)
                  self.dec_dict.append(t)
function_tokens: def gen_dict ( self , text ) : self . enc_dict = { } self . dec_dict = [ ] for t in sorted ( text ) : if t not in self . enc_dict : self . enc_dict [ t ] = len ( self . dec_dict ) self . dec_dict . append ( t )