


'''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



'''simple docstring'''






from ...configuration_utils import PretrainedConfig
from ...utils import logging


__A   :    str											= logging.get_logger(__name__)

__A   :    int											= {
    "weiweishi/roc-bert-base-zh": "https://huggingface.co/weiweishi/roc-bert-base-zh/resolve/main/config.json",
}






class   __snake_case			(  _SCREAMING_SNAKE_CASE):







    """simple docstring"""



    lowercase  					=   'roc_bert'

    def __init__(  self       :    str       ,		lowerCamelCase       :    Optional[Any]=3_05_22       ,		lowerCamelCase       :    List[Any]=7_68       ,		lowerCamelCase       :    int=12       ,		lowerCamelCase       :    str=12       ,		lowerCamelCase       :    Any=30_72       ,		lowerCamelCase       :    List[Any]="gelu"       ,		lowerCamelCase       :    Optional[int]=0.1       ,		lowerCamelCase       :    List[str]=0.1       ,		lowerCamelCase       :    int=5_12       ,		lowerCamelCase       :    List[Any]=2       ,		lowerCamelCase       :    int=0.02       ,		lowerCamelCase       :    str=1E-12       ,		lowerCamelCase       :    int=True       ,		lowerCamelCase       :    Optional[Any]=0       ,		lowerCamelCase       :    List[Any]="absolute"       ,		lowerCamelCase       :    str=None       ,		lowerCamelCase       :    str=True       ,		lowerCamelCase       :    Tuple=True       ,		lowerCamelCase       :    str=7_68       ,		lowerCamelCase       :    str=9_10       ,		lowerCamelCase       :    Tuple=5_12       ,		lowerCamelCase       :    List[str]=2_48_58       ,		lowerCamelCase       :    Dict=True       ,		**lowerCamelCase       :    Tuple       ,		)  ->    Optional[int]:
      lowerCAmelCase_     : Optional[Any]     =  vocab_size
      lowerCAmelCase_     : Any     =  max_position_embeddings
      lowerCAmelCase_     : Any     =  hidden_size
      lowerCAmelCase_     : int     =  num_hidden_layers
      lowerCAmelCase_     : Tuple     =  num_attention_heads
      lowerCAmelCase_     : List[Any]     =  intermediate_size
      lowerCAmelCase_     : Tuple     =  hidden_act
      lowerCAmelCase_     : List[Any]     =  hidden_dropout_prob
      lowerCAmelCase_     : Dict     =  attention_probs_dropout_prob
      lowerCAmelCase_     : Any     =  initializer_range
      lowerCAmelCase_     : Any     =  type_vocab_size
      lowerCAmelCase_     : Optional[int]     =  layer_norm_eps
      lowerCAmelCase_     : Tuple     =  use_cache
      lowerCAmelCase_     : List[Any]     =  enable_pronunciation
      lowerCAmelCase_     : List[Any]     =  enable_shape
      lowerCAmelCase_     : List[str]     =  pronunciation_embed_dim
      lowerCAmelCase_     : List[str]     =  pronunciation_vocab_size
      lowerCAmelCase_     : Dict     =  shape_embed_dim
      lowerCAmelCase_     : Optional[Any]     =  shape_vocab_size
      lowerCAmelCase_     : List[Any]     =  concat_input
      lowerCAmelCase_     : Any     =  position_embedding_type
      lowerCAmelCase_     : List[str]     =  classifier_dropout
      super().__init__(pad_token_id=lowerCamelCase       ,		**lowerCamelCase						)



