from abc import ABC, abstractmethod
from typing import Optional, Union

from .. import Dataset, DatasetDict, Features, IterableDataset, IterableDatasetDict, NamedSplit
from ..utils.typing import NestedDataStructureLike, PathLike


class 			UpperCAmelCase__    (		snake_case					):



  """simple docstring"""






  def __init__(				self:			List[Any]				,				__lowerCAmelCase:			Optional[NestedDataStructureLike[PathLike]] = None				,				__lowerCAmelCase:			Optional[NamedSplit] = None				,				__lowerCAmelCase:			Optional[Features] = None				,				__lowerCAmelCase:			str = None				,				__lowerCAmelCase:			bool = False				,				__lowerCAmelCase:			bool = False				,				__lowerCAmelCase:			Optional[int] = None				,				**__lowerCAmelCase:			Union[str, Any]				,				) -> Any:




    '''simple docstring'''




    __UpperCAmelCase						    =       path_or_paths
    __UpperCAmelCase						    =       split if split or isinstance(__lowerCAmelCase				,				__lowerCAmelCase   ) else "train"
    __UpperCAmelCase						    =       features
    __UpperCAmelCase						    =       cache_dir
    __UpperCAmelCase						    =       keep_in_memory
    __UpperCAmelCase						    =       streaming
    __UpperCAmelCase						    =       num_proc
    __UpperCAmelCase						    =       kwargs






  @abstractmethod
  def 	_UpperCAmelCase				(				self:			Optional[int]   ) -> Union[Dataset, DatasetDict, IterableDataset, IterableDatasetDict]:




    '''simple docstring'''




    pass






class 			UpperCAmelCase__    (		snake_case					):



  """simple docstring"""






  def __init__(				self:			Optional[int]				,				__lowerCAmelCase:			Optional[Features] = None				,				__lowerCAmelCase:			str = None				,				__lowerCAmelCase:			bool = False				,				__lowerCAmelCase:			bool = False				,				__lowerCAmelCase:			Optional[int] = None				,				**__lowerCAmelCase:			Any				,				) -> List[Any]:




    '''simple docstring'''




    __UpperCAmelCase						    =       features
    __UpperCAmelCase						    =       cache_dir
    __UpperCAmelCase						    =       keep_in_memory
    __UpperCAmelCase						    =       streaming
    __UpperCAmelCase						    =       num_proc
    __UpperCAmelCase						    =       kwargs






  @abstractmethod
  def 	_UpperCAmelCase				(				self:			List[Any]   ) -> Union[Dataset, IterableDataset]:




    '''simple docstring'''




    pass




from typing import TYPE_CHECKING

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


a_							=      {"""processing_layoutxlm""": ["""LayoutXLMProcessor"""]}

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

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

if TYPE_CHECKING:
       from .processing_layoutxlm import LayoutXLMProcessor

       try:
              if not is_sentencepiece_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .tokenization_layoutxlm import LayoutXLMTokenizer

       try:
              if not is_tokenizers_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .tokenization_layoutxlm_fast import LayoutXLMTokenizerFast

else:
       import sys

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



