
import functools
import operator

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


lowercase_											=	logging.get_logger(__name__)

lowercase_											=	{
    """facebook/hubert-base-ls960""": """https://huggingface.co/facebook/hubert-base-ls960/resolve/main/config.json""",
    # See all Hubert models at https://huggingface.co/models?filter=hubert
}





class   __UpperCamelCase				(    _UpperCAmelCase   ):






     """simple docstring"""







     lowerCAmelCase_     =	'''hubert'''



     def __init__(							self    :    str      ,		_A    :    Any=32      ,		_A    :    int=768      ,		_A    :    List[str]=12      ,		_A    :    List[Any]=12      ,		_A    :    Optional[int]=3072      ,		_A    :    Any="gelu"      ,		_A    :    int=0.1      ,		_A    :    List[str]=0.1      ,		_A    :    Tuple=0.1      ,		_A    :    Optional[int]=True      ,		_A    :    Tuple=0.0      ,		_A    :    List[Any]=0.1      ,		_A    :    Dict=0.1      ,		_A    :    int=0.02      ,		_A    :    Union[str, Any]=1e-5      ,		_A    :    Union[str, Any]="group"      ,		_A    :    str="gelu"      ,		_A    :    Tuple=(512, 512, 512, 512, 512, 512, 512)      ,		_A    :    Optional[int]=(5, 2, 2, 2, 2, 2, 2)      ,		_A    :    Optional[int]=(10, 3, 3, 3, 3, 2, 2)      ,		_A    :    Optional[int]=False      ,		_A    :    str=128      ,		_A    :    Any=16      ,		_A    :    Optional[Any]=False      ,		_A    :    Any=True      ,		_A    :    Optional[Any]=0.05      ,		_A    :    Tuple=10      ,		_A    :    Union[str, Any]=2      ,		_A    :    str=0.0      ,		_A    :    Any=10      ,		_A    :    List[str]=0      ,		_A    :    Dict="sum"      ,		_A    :    int=False      ,		_A    :    str=False      ,		_A    :    Optional[Any]=256      ,		_A    :    Optional[Any]=0      ,		_A    :    Tuple=1      ,		_A    :    List[str]=2      ,		**_A    :    List[Any]      ,		):







       """simple docstring"""




       super().__init__(**lowercase__      ,		pad_token_id=lowercase__      ,		bos_token_id=lowercase__      ,		eos_token_id=lowercase__				)
       __SCREAMING_SNAKE_CASE     :					Optional[Any]			=						hidden_size
       __SCREAMING_SNAKE_CASE     :					List[str]			=						feat_extract_norm
       __SCREAMING_SNAKE_CASE     :					Dict			=						feat_extract_activation
       __SCREAMING_SNAKE_CASE     :					str			=						list(lowercase__				)
       __SCREAMING_SNAKE_CASE     :					int			=						list(lowercase__				)
       __SCREAMING_SNAKE_CASE     :					Optional[int]			=						list(lowercase__				)
       __SCREAMING_SNAKE_CASE     :					List[str]			=						conv_bias
       __SCREAMING_SNAKE_CASE     :					str			=						num_conv_pos_embeddings
       __SCREAMING_SNAKE_CASE     :					Optional[Any]			=						num_conv_pos_embedding_groups
       __SCREAMING_SNAKE_CASE     :					Union[str, Any]			=						len(self.conv_dim				)
       __SCREAMING_SNAKE_CASE     :					Any			=						num_hidden_layers
       __SCREAMING_SNAKE_CASE     :					Optional[Any]			=						intermediate_size
       __SCREAMING_SNAKE_CASE     :					Union[str, Any]			=						hidden_act
       __SCREAMING_SNAKE_CASE     :					Union[str, Any]			=						num_attention_heads
       __SCREAMING_SNAKE_CASE     :					Any			=						hidden_dropout
       __SCREAMING_SNAKE_CASE     :					List[str]			=						attention_dropout
       __SCREAMING_SNAKE_CASE     :					Optional[Any]			=						activation_dropout
       __SCREAMING_SNAKE_CASE     :					Union[str, Any]			=						feat_proj_layer_norm
       __SCREAMING_SNAKE_CASE     :					Optional[int]			=						feat_proj_dropout
       __SCREAMING_SNAKE_CASE     :					Optional[int]			=						final_dropout
       __SCREAMING_SNAKE_CASE     :					Dict			=						layerdrop
       __SCREAMING_SNAKE_CASE     :					Optional[Any]			=						layer_norm_eps
       __SCREAMING_SNAKE_CASE     :					Tuple			=						initializer_range
       __SCREAMING_SNAKE_CASE     :					List[str]			=						vocab_size
       __SCREAMING_SNAKE_CASE     :					Union[str, Any]			=						do_stable_layer_norm
       __SCREAMING_SNAKE_CASE     :					List[str]			=						use_weighted_layer_sum
       __SCREAMING_SNAKE_CASE     :					Any			=						classifier_proj_size

       if (
           (len(self.conv_stride				) != self.num_feat_extract_layers)
           or (len(self.conv_kernel				) != self.num_feat_extract_layers)
           or (len(self.conv_dim				) != self.num_feat_extract_layers)
       ):
         raise ValueError(
             '''Configuration for convolutional layers is incorrect. It is required that `len(config.conv_dim)` =='''
             ''' `len(config.conv_stride)` == `len(config.conv_kernel)`, but is `len(config.conv_dim) ='''
             F''' {len(self.conv_dim				)}`, `len(config.conv_stride) = {len(self.conv_stride				)}`,'''
             F''' `len(config.conv_kernel) = {len(self.conv_kernel				)}`.'''				)

       # fine-tuning config parameters for SpecAugment: https://arxiv.org/abs/1904.08779
       __SCREAMING_SNAKE_CASE     :					Tuple			=						apply_spec_augment
       __SCREAMING_SNAKE_CASE     :					Union[str, Any]			=						mask_time_prob
       __SCREAMING_SNAKE_CASE     :					List[Any]			=						mask_time_length
       __SCREAMING_SNAKE_CASE     :					Optional[Any]			=						mask_time_min_masks
       __SCREAMING_SNAKE_CASE     :					Optional[int]			=						mask_feature_prob
       __SCREAMING_SNAKE_CASE     :					List[Any]			=						mask_feature_length
       __SCREAMING_SNAKE_CASE     :					Union[str, Any]			=						mask_feature_min_masks

       # ctc loss
       __SCREAMING_SNAKE_CASE     :					List[Any]			=						ctc_loss_reduction
       __SCREAMING_SNAKE_CASE     :					List[Any]			=						ctc_zero_infinity




     @property
     def 				UpperCAmelCase__    (							self    :    int				):







       """simple docstring"""




       return functools.reduce(operator.mul      ,		self.conv_stride      ,		1				)


from collections import defaultdict


def     a__			(    snake_case    ):





  """simple docstring"""
  __SCREAMING_SNAKE_CASE     :					defaultdict[str, int]			=						defaultdict(snake_case    )
  # Creating a dictionary containing count of each word
  for word in sentence.split():
    occurrence[word] += 1
  return occurrence


if __name__ == "__main__":
   for word, count in word_occurrence("""INPUT STRING""").items():
      print(f'''{word}: {count}''')
