


'''simple docstring'''







def 			lowercase				(_A					):







       """simple docstring"""







       _lowerCAmelCase    :							str   			=       [0] * len(_A					)

       for i in range(1   ,						len(_A					)					):
              # use last results for better performance - dynamic programming
              _lowerCAmelCase    :							str   			=       prefix_result[i - 1]
              while j > 0 and input_string[i] != input_string[j]:
                     _lowerCAmelCase    :							Optional[int]   			=       prefix_result[j - 1]

              if input_string[i] == input_string[j]:
                     j += 1
              _lowerCAmelCase    :							Dict   			=       j

       return prefix_result






def 			lowercase				(_A					):







       """simple docstring"""







       return max(prefix_function(_A					)					)


if __name__ == "__main__":
       import doctest

       doctest.testmod()





'''simple docstring'''







from typing import TYPE_CHECKING

from ....utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


lowerCAmelCase    :     Optional[int]					=						{
    """configuration_mctct""": ["""MCTCT_PRETRAINED_CONFIG_ARCHIVE_MAP""", """MCTCTConfig"""],
    """feature_extraction_mctct""": ["""MCTCTFeatureExtractor"""],
    """processing_mctct""": ["""MCTCTProcessor"""],
}


try:
       if not is_torch_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       lowerCAmelCase    :     List[str]					=						[
           """MCTCT_PRETRAINED_MODEL_ARCHIVE_LIST""",
           """MCTCTForCTC""",
           """MCTCTModel""",
           """MCTCTPreTrainedModel""",
       ]


if TYPE_CHECKING:
       from .configuration_mctct import MCTCT_PRETRAINED_CONFIG_ARCHIVE_MAP, MCTCTConfig
       from .feature_extraction_mctct import MCTCTFeatureExtractor
       from .processing_mctct import MCTCTProcessor

       try:
              if not is_torch_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_mctct import MCTCT_PRETRAINED_MODEL_ARCHIVE_LIST, MCTCTForCTC, MCTCTModel, MCTCTPreTrainedModel

else:
       import sys

       lowerCAmelCase    :     Tuple					=						_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)

