


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


lowerCAmelCase__      		= logging.get_logger(__name__)

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







class      lowerCAmelCase__       (				UpperCamelCase__):




     '''simple docstring'''
     __SCREAMING_SNAKE_CASE  			= "roc_bert"


     def __init__(						self ,						__lowerCamelCase=3_0_5_2_2 ,						__lowerCamelCase=7_6_8 ,						__lowerCamelCase=1_2 ,						__lowerCamelCase=1_2 ,						__lowerCamelCase=3_0_7_2 ,						__lowerCamelCase="gelu" ,						__lowerCamelCase=0.1 ,						__lowerCamelCase=0.1 ,						__lowerCamelCase=5_1_2 ,						__lowerCamelCase=2 ,						__lowerCamelCase=0.0_2 ,						__lowerCamelCase=1e-12 ,						__lowerCamelCase=True ,						__lowerCamelCase=0 ,						__lowerCamelCase="absolute" ,						__lowerCamelCase=None ,						__lowerCamelCase=True ,						__lowerCamelCase=True ,						__lowerCamelCase=7_6_8 ,						__lowerCamelCase=9_1_0 ,						__lowerCamelCase=5_1_2 ,						__lowerCamelCase=2_4_8_5_8 ,						__lowerCamelCase=True ,						**__lowerCamelCase ,						)			->				Optional[Any]:
            _A      :       Dict				    = vocab_size
            _A      :       Optional[int]				    = max_position_embeddings
            _A      :       Union[str, Any]				    = hidden_size
            _A      :       List[str]				    = num_hidden_layers
            _A      :       Optional[Any]				    = num_attention_heads
            _A      :       List[str]				    = intermediate_size
            _A      :       Union[str, Any]				    = hidden_act
            _A      :       Optional[Any]				    = hidden_dropout_prob
            _A      :       int				    = attention_probs_dropout_prob
            _A      :       Optional[Any]				    = initializer_range
            _A      :       List[str]				    = type_vocab_size
            _A      :       Union[str, Any]				    = layer_norm_eps
            _A      :       Tuple				    = use_cache
            _A      :       str				    = enable_pronunciation
            _A      :       Optional[int]				    = enable_shape
            _A      :       Any				    = pronunciation_embed_dim
            _A      :       str				    = pronunciation_vocab_size
            _A      :       int				    = shape_embed_dim
            _A      :       Optional[int]				    = shape_vocab_size
            _A      :       Dict				    = concat_input
            _A      :       Any				    = position_embedding_type
            _A      :       Dict				    = classifier_dropout
            super().__init__(pad_token_id=__lowerCamelCase ,						**__lowerCamelCase)







class     SCREAMING_SNAKE_CASE__ :



 def __init__(							self,__lowerCamelCase ):
        A__											=						set_counts
        A__											=						max(__lowerCamelCase )
        A__											=						len(__lowerCamelCase )
        A__											=						[1] * num_sets
        A__											=						list(range(__lowerCamelCase ) )



 def 				UpperCamelCase			(							self,__lowerCamelCase,__lowerCamelCase ):
        A__											=						self.get_parent(__lowerCamelCase )
        A__											=						self.get_parent(__lowerCamelCase )

        if src_parent == dst_parent:
               return False

        if self.ranks[dst_parent] >= self.ranks[src_parent]:
               self.set_counts[dst_parent] += self.set_counts[src_parent]
               A__											=						0
               A__											=						dst_parent
               if self.ranks[dst_parent] == self.ranks[src_parent]:
                      self.ranks[dst_parent] += 1
               A__											=						self.set_counts[dst_parent]
        else:
               self.set_counts[src_parent] += self.set_counts[dst_parent]
               A__											=						0
               A__											=						src_parent
               A__											=						self.set_counts[src_parent]

        A__											=						max(self.max_set,__lowerCamelCase )
        return True




 def 				UpperCamelCase			(							self,__lowerCamelCase ):
        if self.parents[disj_set] == disj_set:
               return disj_set
        A__											=						self.get_parent(self.parents[disj_set] )
        return self.parents[disj_set]





