




def 							lowerCamelCase    (							UpperCAmelCase_	:      str   ,       UpperCAmelCase_	:      str      )->			Tuple:

       """simple docstring"""




       if len(_lowerCAmelCase      ) < len(_lowerCAmelCase      ):
              return levenshtein_distance(_lowerCAmelCase   ,       _lowerCAmelCase      )

       if len(_lowerCAmelCase      ) == 0:
              return len(_lowerCAmelCase      )

       a			   =list(range(len(_lowerCAmelCase      ) + 1      )      )

       for i, ca in enumerate(_lowerCAmelCase      ):
              a			   =[i + 1]

              for j, ca in enumerate(_lowerCAmelCase      ):
                     # Calculate insertions, deletions and substitutions
                     a			   =previous_row[j + 1] + 1
                     a			   =current_row[j] + 1
                     a			   =previous_row[j] + (ca != ca)

                     # Get the minimum to append to the current row
                     current_row.append(min(_lowerCAmelCase   ,       _lowerCAmelCase   ,       _lowerCAmelCase      )      )

              # Store the previous row
              a			   =current_row

       # Returns the last element (distance)
       return previous_row[-1]


if __name__ == "__main__":
    _lowerCamelCase							=      input('''Enter the first word:\n''').strip()
    _lowerCamelCase							=      input('''Enter the second word:\n''').strip()

    _lowerCamelCase							=      levenshtein_distance(first_word, second_word)
    print(f"""Levenshtein distance between {first_word} and {second_word} is {result}""")




"""simple docstring"""






import argparse

import torch

from transformers import RoFormerConfig, RoFormerForMaskedLM, load_tf_weights_in_roformer
from transformers.utils import logging


logging.set_verbosity_info()
def    A_ ( _lowerCAmelCase  :       Dict,  _lowerCAmelCase  :       Tuple,  _lowerCAmelCase  :       Optional[Any]							):






     """simple docstring"""

     _a     						=					RoFormerConfig.from_json_file(_lowerCAmelCase							)
     print(f'Building PyTorch model from configuration: {config}'							)
     _a     						=					RoFormerForMaskedLM(_lowerCAmelCase							)

     # Load weights from tf checkpoint
     load_tf_weights_in_roformer(_lowerCAmelCase,  _lowerCAmelCase,  _lowerCAmelCase							)

     # Save pytorch-model
     print(f'Save PyTorch model to {pytorch_dump_path}'							)
     torch.save(model.state_dict(),  _lowerCAmelCase,  _use_new_zipfile_serialization=_lowerCAmelCase							)


if __name__ == "__main__":
   __snake_case												=							argparse.ArgumentParser()
   # Required parameters
   parser.add_argument(
       '''--tf_checkpoint_path''', default=None, type=str, required=True, help='''Path to the TensorFlow checkpoint path.'''
   )
   parser.add_argument(
       '''--bert_config_file''',
       default=None,
       type=str,
       required=True,
       help=(
           '''The config json file corresponding to the pre-trained BERT model. \n'''
           '''This specifies the model architecture.'''
       ),
   )
   parser.add_argument(
       '''--pytorch_dump_path''', default=None, type=str, required=True, help='''Path to the output PyTorch model.'''
   )
   __snake_case												=							parser.parse_args()
   convert_tf_checkpoint_to_pytorch(args.tf_checkpoint_path, args.bert_config_file, args.pytorch_dump_path)