


'''simple docstring'''


from ..utils import DummyObject, requires_backends







class 							__magic_name__	(       metaclass=lowerCAmelCase ):

     """simple docstring"""






     lowerCamelCase__       						=				['speech']


     def __init__(   self			,     *lowerCamelCase			,     **lowerCamelCase		):


          '''simple docstring'''





          requires_backends(self			,     ["speech"]		)







class 							__magic_name__	(       metaclass=lowerCAmelCase ):

     """simple docstring"""






     lowerCamelCase__       						=				['speech']


     def __init__(   self			,     *lowerCamelCase			,     **lowerCamelCase		):


          '''simple docstring'''





          requires_backends(self			,     ["speech"]		)





'''simple docstring'''


import functools


def 		_lowercase (SCREAMING_SNAKE_CASE       ,					SCREAMING_SNAKE_CASE							):




     '''simple docstring'''





     __A	:       int      =							len(SCREAMING_SNAKE_CASE							)
     __A	:       int      =							len(SCREAMING_SNAKE_CASE							)

     @functools.cache
     def min_distance(SCREAMING_SNAKE_CASE       ,					SCREAMING_SNAKE_CASE							) -> int:
          # if first word index is overflow - delete all from the second word
          if indexa >= len_worda:
               return len_worda - indexa
          # if second word index is overflow - delete all from the first word
          if indexa >= len_worda:
               return len_worda - indexa
          __A	:       Optional[int]      =							int(worda[indexa] != worda[indexa]							)  # current letters not identical
          return min(
              1 + min_distance(indexa + 1       ,					SCREAMING_SNAKE_CASE							)       ,					1 + min_distance(SCREAMING_SNAKE_CASE       ,					indexa + 1							)       ,					diff + min_distance(indexa + 1       ,					indexa + 1							)       ,					)

     return min_distance(0       ,					0							)


if __name__ == "__main__":
      import doctest

      doctest.testmod()

