


'''simple docstring'''






from typing import Optional

from .. import Features, NamedSplit
from ..packaged_modules.text.text import Text
from ..utils.typing import NestedDataStructureLike, PathLike
from .abc import AbstractDatasetReader




class 						a__							(				a__    ):





							'''simple docstring'''






							def __init__(						self   ,       lowerCamelCase_   ,       lowerCamelCase_ = None   ,       lowerCamelCase_ = None   ,       lowerCamelCase_ = None   ,       lowerCamelCase_ = False   ,       lowerCamelCase_ = False   ,       lowerCamelCase_ = None   ,       **lowerCamelCase_   ,       )			->				Optional[int]:
														super().__init__(
														    lowerCamelCase_   ,       split=lowerCamelCase_   ,       features=lowerCamelCase_   ,       cache_dir=lowerCamelCase_   ,       keep_in_memory=lowerCamelCase_   ,       streaming=lowerCamelCase_   ,       num_proc=lowerCamelCase_   ,       **lowerCamelCase_   ,       )
														lowerCAmelCase__			  =      path_or_paths if isinstance(lowerCamelCase_   ,       lowerCamelCase_  ) else {self.split: path_or_paths}
														lowerCAmelCase__			  =      Text(
														    cache_dir=lowerCamelCase_   ,       data_files=lowerCamelCase_   ,       features=lowerCamelCase_   ,       **lowerCamelCase_   ,       )







							def     __SCREAMING_SNAKE_CASE				(						self  )			->				int:
														# Build iterable dataset
														if self.streaming:
																					lowerCAmelCase__			  =      self.builder.as_streaming_dataset(split=self.split  )
														# Build regular (map-style) dataset
														else:
																					lowerCAmelCase__			  =      None
																					lowerCAmelCase__			  =      None
																					lowerCAmelCase__			  =      None
																					lowerCAmelCase__			  =      None

																					self.builder.download_and_prepare(
																					    download_config=lowerCamelCase_   ,       download_mode=lowerCamelCase_   ,       verification_mode=lowerCamelCase_   ,       base_path=lowerCamelCase_   ,       num_proc=self.num_proc   ,       )
																					lowerCAmelCase__			  =      self.builder.as_dataset(
																					    split=self.split   ,       verification_mode=lowerCamelCase_   ,       in_memory=self.keep_in_memory  )
														return dataset




from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_sentencepiece_available


lowerCamelCase		       =      {}


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

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


else:
						import sys

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


