
import functools






def      lowerCamelCase__       (       __lowerCAmelCase						:						str					,							__lowerCAmelCase						:						str       ):




			"""simple docstring"""


			lowerCAmelCase_      			=			len(__lowerCAmelCase       )
			lowerCAmelCase_      			=			len(__lowerCAmelCase       )

			@functools.cache
			def min_distance(__lowerCAmelCase						:						int					,							__lowerCAmelCase						:						int       ) -> 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
						lowerCAmelCase_      			=			int(worda[indexa] != worda[indexa]       )  # current letters not identical
						return min(
						    1 + min_distance(indexa + 1					,							__lowerCAmelCase       )					,							1 + min_distance(__lowerCAmelCase					,							indexa + 1       )					,							diff + min_distance(indexa + 1					,							indexa + 1       )					,							)

			return min_distance(0					,							0       )


if __name__ == "__main__":
			import doctest

			doctest.testmod()





from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_sentencepiece_available,
    is_tokenizers_available,
    is_torch_available,
)


_A     =  {}

try:
			if not is_sentencepiece_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			_A     =  ["NllbTokenizer"]

try:
			if not is_tokenizers_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			_A     =  ["NllbTokenizerFast"]


if TYPE_CHECKING:
			try:
						if not is_sentencepiece_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .tokenization_nllb import NllbTokenizer

			try:
						if not is_tokenizers_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .tokenization_nllb_fast import NllbTokenizerFast

else:
			import sys

			_A     =  _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)



