

"""simple docstring"""




import functools
import operator

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


lowerCAmelCase       :				Optional[Any]         =					logging.get_logger(__name__)

lowerCAmelCase       :				List[str]         =					{
    '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 	_A						(					__magic_name__):
  SCREAMING_SNAKE_CASE      : Tuple    =					'''hubert'''

  def __init__(			self	,   _SCREAMING_SNAKE_CASE=32	,   _SCREAMING_SNAKE_CASE=768	,   _SCREAMING_SNAKE_CASE=12	,   _SCREAMING_SNAKE_CASE=12	,   _SCREAMING_SNAKE_CASE=3072	,   _SCREAMING_SNAKE_CASE="gelu"	,   _SCREAMING_SNAKE_CASE=0.1	,   _SCREAMING_SNAKE_CASE=0.1	,   _SCREAMING_SNAKE_CASE=0.1	,   _SCREAMING_SNAKE_CASE=True	,   _SCREAMING_SNAKE_CASE=0.0	,   _SCREAMING_SNAKE_CASE=0.1	,   _SCREAMING_SNAKE_CASE=0.1	,   _SCREAMING_SNAKE_CASE=0.02	,   _SCREAMING_SNAKE_CASE=1e-5	,   _SCREAMING_SNAKE_CASE="group"	,   _SCREAMING_SNAKE_CASE="gelu"	,   _SCREAMING_SNAKE_CASE=(512, 512, 512, 512, 512, 512, 512)	,   _SCREAMING_SNAKE_CASE=(5, 2, 2, 2, 2, 2, 2)	,   _SCREAMING_SNAKE_CASE=(10, 3, 3, 3, 3, 2, 2)	,   _SCREAMING_SNAKE_CASE=False	,   _SCREAMING_SNAKE_CASE=128	,   _SCREAMING_SNAKE_CASE=16	,   _SCREAMING_SNAKE_CASE=False	,   _SCREAMING_SNAKE_CASE=True	,   _SCREAMING_SNAKE_CASE=0.05	,   _SCREAMING_SNAKE_CASE=10	,   _SCREAMING_SNAKE_CASE=2	,   _SCREAMING_SNAKE_CASE=0.0	,   _SCREAMING_SNAKE_CASE=10	,   _SCREAMING_SNAKE_CASE=0	,   _SCREAMING_SNAKE_CASE="sum"	,   _SCREAMING_SNAKE_CASE=False	,   _SCREAMING_SNAKE_CASE=False	,   _SCREAMING_SNAKE_CASE=256	,   _SCREAMING_SNAKE_CASE=0	,   _SCREAMING_SNAKE_CASE=1	,   _SCREAMING_SNAKE_CASE=2	,   **_SCREAMING_SNAKE_CASE	,   ):





        """simple docstring"""







        super().__init__(**_SCREAMING_SNAKE_CASE	,   pad_token_id=_SCREAMING_SNAKE_CASE	,   bos_token_id=_SCREAMING_SNAKE_CASE	,   eos_token_id=_SCREAMING_SNAKE_CASE   )
        SCREAMING_SNAKE_CASE_			:					Tuple          =       hidden_size
        SCREAMING_SNAKE_CASE_			:					List[str]          =       feat_extract_norm
        SCREAMING_SNAKE_CASE_			:					Optional[Any]          =       feat_extract_activation
        SCREAMING_SNAKE_CASE_			:					Optional[int]          =       list(_SCREAMING_SNAKE_CASE   )
        SCREAMING_SNAKE_CASE_			:					Any          =       list(_SCREAMING_SNAKE_CASE   )
        SCREAMING_SNAKE_CASE_			:					int          =       list(_SCREAMING_SNAKE_CASE   )
        SCREAMING_SNAKE_CASE_			:					Dict          =       conv_bias
        SCREAMING_SNAKE_CASE_			:					Optional[int]          =       num_conv_pos_embeddings
        SCREAMING_SNAKE_CASE_			:					Dict          =       num_conv_pos_embedding_groups
        SCREAMING_SNAKE_CASE_			:					List[str]          =       len(self.conv_dim   )
        SCREAMING_SNAKE_CASE_			:					Optional[Any]          =       num_hidden_layers
        SCREAMING_SNAKE_CASE_			:					Any          =       intermediate_size
        SCREAMING_SNAKE_CASE_			:					Any          =       hidden_act
        SCREAMING_SNAKE_CASE_			:					List[Any]          =       num_attention_heads
        SCREAMING_SNAKE_CASE_			:					List[Any]          =       hidden_dropout
        SCREAMING_SNAKE_CASE_			:					Tuple          =       attention_dropout
        SCREAMING_SNAKE_CASE_			:					List[str]          =       activation_dropout
        SCREAMING_SNAKE_CASE_			:					Optional[int]          =       feat_proj_layer_norm
        SCREAMING_SNAKE_CASE_			:					Tuple          =       feat_proj_dropout
        SCREAMING_SNAKE_CASE_			:					Any          =       final_dropout
        SCREAMING_SNAKE_CASE_			:					str          =       layerdrop
        SCREAMING_SNAKE_CASE_			:					Optional[Any]          =       layer_norm_eps
        SCREAMING_SNAKE_CASE_			:					List[str]          =       initializer_range
        SCREAMING_SNAKE_CASE_			:					Dict          =       vocab_size
        SCREAMING_SNAKE_CASE_			:					str          =       do_stable_layer_norm
        SCREAMING_SNAKE_CASE_			:					List[str]          =       use_weighted_layer_sum
        SCREAMING_SNAKE_CASE_			:					List[str]          =       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_			:					Union[str, Any]          =       apply_spec_augment
        SCREAMING_SNAKE_CASE_			:					Union[str, Any]          =       mask_time_prob
        SCREAMING_SNAKE_CASE_			:					List[str]          =       mask_time_length
        SCREAMING_SNAKE_CASE_			:					Any          =       mask_time_min_masks
        SCREAMING_SNAKE_CASE_			:					Optional[Any]          =       mask_feature_prob
        SCREAMING_SNAKE_CASE_			:					Any          =       mask_feature_length
        SCREAMING_SNAKE_CASE_			:					Dict          =       mask_feature_min_masks

        # ctc loss
        SCREAMING_SNAKE_CASE_			:					Optional[Any]          =       ctc_loss_reduction
        SCREAMING_SNAKE_CASE_			:					List[str]          =       ctc_zero_infinity



  @property
  def 	UpperCAmelCase      (			self   ):





        """simple docstring"""







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









from collections import defaultdict

def 				A_					(							a					):

      """simple docstring"""



      SCREAMING_SNAKE_CASE_			:					defaultdict[str, int]          =       defaultdict(a					)
      # 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}')






