parameters: (letter_case)
return_statement: return list(itertools.chain.from_iterable(unicodes)), unicode_lengths
docstring: Extract conversions. It provide the full (or remained) case mappings from the table.
      The counter table contains the information of how much one-to-one, one-to-two or one-to-three mappings
      exists successively in the conversion table.
  
      :return: A table with conversions, and a table with counters.
docstring_summary: Extract conversions. It provide the full (or remained) case mappings from the table.
      The counter table contains the information of how much one-to-one, one-to-two or one-to-three mappings
      exists successively in the conversion table.
docstring_tokens: Extract conversions . It provide the full ( or remained ) case mappings from the table . The counter table contains the information of how much one - to - one one - to - two or one - to - three mappings exists successively in the conversion table .
function: def extract_conversions(letter_case):
      """
      Extract conversions. It provide the full (or remained) case mappings from the table.
      The counter table contains the information of how much one-to-one, one-to-two or one-to-three mappings
      exists successively in the conversion table.
  
      :return: A table with conversions, and a table with counters.
      """
  
      unicodes = [[], [], []]
      unicode_lengths = [0, 0, 0]
  
      # 1 to 1 byte
      for letter_id in sorted(letter_case.keys()):
          mapped_value = letter_case[letter_id]
  
          if len(mapped_value) != 1:
              continue
  
          unicodes[0].extend([letter_id, ord(mapped_value)])
          del letter_case[letter_id]
  
      # 1 to 2 bytes
      for letter_id in sorted(letter_case.keys()):
          mapped_value = letter_case[letter_id]
  
          if len(mapped_value) != 2:
              continue
  
          unicodes[1].extend([letter_id, ord(mapped_value[0]), ord(mapped_value[1])])
          del letter_case[letter_id]
  
      # 1 to 3 bytes
      for letter_id in sorted(letter_case.keys()):
          mapped_value = letter_case[letter_id]
  
          if len(mapped_value) != 3:
              continue
  
          unicodes[2].extend([letter_id, ord(mapped_value[0]), ord(mapped_value[1]), ord(mapped_value[2])])
          del letter_case[letter_id]
  
      unicode_lengths = [int(len(unicodes[0]) / 2), int(len(unicodes[1]) / 3), int(len(unicodes[2]) / 4)]
  
      return list(itertools.chain.from_iterable(unicodes)), unicode_lengths
function_tokens: def extract_conversions ( letter_case ) : unicodes = [ [ ] , [ ] , [ ] ] unicode_lengths = [ 0 , 0 , 0 ] # 1 to 1 byte for letter_id in sorted ( letter_case . keys ( ) ) : mapped_value = letter_case [ letter_id ] if len ( mapped_value ) != 1 : continue unicodes [ 0 ] . extend ( [ letter_id , ord ( mapped_value ) ] ) del letter_case [ letter_id ] # 1 to 2 bytes for letter_id in sorted ( letter_case . keys ( ) ) : mapped_value = letter_case [ letter_id ] if len ( mapped_value ) != 2 : continue unicodes [ 1 ] . extend ( [ letter_id , ord ( mapped_value [ 0 ] ) , ord ( mapped_value [ 1 ] ) ] ) del letter_case [ letter_id ] # 1 to 3 bytes for letter_id in sorted ( letter_case . keys ( ) ) : mapped_value = letter_case [ letter_id ] if len ( mapped_value ) != 3 : continue unicodes [ 2 ] . extend ( [ letter_id , ord ( mapped_value [ 0 ] ) , ord ( mapped_value [ 1 ] ) , ord ( mapped_value [ 2 ] ) ] ) del letter_case [ letter_id ] unicode_lengths = [ int ( len ( unicodes [ 0 ] ) / 2 ) , int ( len ( unicodes [ 1 ] ) / 3 ) , int ( len ( unicodes [ 2 ] ) / 4 ) ] return list ( itertools . chain . from_iterable ( unicodes ) ) , unicode_lengths