"""simple docstring"""


from typing import TYPE_CHECKING

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


lowerCAmelCase_:					str     =					{
    'configuration_convbert': ['CONVBERT_PRETRAINED_CONFIG_ARCHIVE_MAP', 'ConvBertConfig', 'ConvBertOnnxConfig'],
    'tokenization_convbert': ['ConvBertTokenizer'],
}

try:
 if not is_tokenizers_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 lowerCAmelCase_:					Optional[int]     =					['ConvBertTokenizerFast']

try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 lowerCAmelCase_:					str     =					[
     'CONVBERT_PRETRAINED_MODEL_ARCHIVE_LIST',
     'ConvBertForMaskedLM',
     'ConvBertForMultipleChoice',
     'ConvBertForQuestionAnswering',
     'ConvBertForSequenceClassification',
     'ConvBertForTokenClassification',
     'ConvBertLayer',
     'ConvBertModel',
     'ConvBertPreTrainedModel',
     'load_tf_weights_in_convbert',
 ]


try:
 if not is_tf_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 lowerCAmelCase_:					Dict     =					[
     'TF_CONVBERT_PRETRAINED_MODEL_ARCHIVE_LIST',
     'TFConvBertForMaskedLM',
     'TFConvBertForMultipleChoice',
     'TFConvBertForQuestionAnswering',
     'TFConvBertForSequenceClassification',
     'TFConvBertForTokenClassification',
     'TFConvBertLayer',
     'TFConvBertModel',
     'TFConvBertPreTrainedModel',
 ]


if TYPE_CHECKING:
 from .configuration_convbert import CONVBERT_PRETRAINED_CONFIG_ARCHIVE_MAP, ConvBertConfig, ConvBertOnnxConfig
 from .tokenization_convbert import ConvBertTokenizer

 try:
  if not is_tokenizers_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .tokenization_convbert_fast import ConvBertTokenizerFast

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_convbert import (
      CONVBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
      ConvBertForMaskedLM,
      ConvBertForMultipleChoice,
      ConvBertForQuestionAnswering,
      ConvBertForSequenceClassification,
      ConvBertForTokenClassification,
      ConvBertLayer,
      ConvBertModel,
      ConvBertPreTrainedModel,
      load_tf_weights_in_convbert,
  )

 try:
  if not is_tf_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_tf_convbert import (
      TF_CONVBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
      TFConvBertForMaskedLM,
      TFConvBertForMultipleChoice,
      TFConvBertForQuestionAnswering,
      TFConvBertForSequenceClassification,
      TFConvBertForTokenClassification,
      TFConvBertLayer,
      TFConvBertModel,
      TFConvBertPreTrainedModel,
  )


else:
 import sys

 lowerCAmelCase_:					Any     =					_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)





"""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	):


   def __init__(     self,				_UpperCAmelCase,				_UpperCAmelCase = None,				_UpperCAmelCase = None,				_UpperCAmelCase = None,				_UpperCAmelCase = False,				_UpperCAmelCase = False,				_UpperCAmelCase = None,				**_UpperCAmelCase,				):
        '''simple docstring'''



        super().__init__(
            _UpperCAmelCase,				split=_UpperCAmelCase,				features=_UpperCAmelCase,				cache_dir=_UpperCAmelCase,				keep_in_memory=_UpperCAmelCase,				streaming=_UpperCAmelCase,				num_proc=_UpperCAmelCase,				**_UpperCAmelCase,				)
        lowercase__				 =							path_or_paths if isinstance(_UpperCAmelCase,				_UpperCAmelCase  ) else {self.split: path_or_paths}
        lowercase__				 =							Text(
            cache_dir=_UpperCAmelCase,				data_files=_UpperCAmelCase,				features=_UpperCAmelCase,				**_UpperCAmelCase,				)


   def 	snake_case__	(     self  ):
        '''simple docstring'''



        if self.streaming:
             lowercase__				 =							self.builder.as_streaming_dataset(split=self.split  )
        # Build regular (map-style) dataset
        else:
             lowercase__				 =							None
             lowercase__				 =							None
             lowercase__				 =							None
             lowercase__				 =							None

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




