"""simple docstring"""
import json
from typing import List, Optional, Tuple

from tokenizers import normalizers

from ...tokenization_utils_fast import PreTrainedTokenizerFast
from .tokenization_electra import ElectraTokenizer


lowercase__					       =	{'vocab_file': 'vocab.txt', 'tokenizer_file': 'tokenizer.json'}

lowercase__					       =	{
    'vocab_file': {
        'google/electra-small-generator': (
            'https://huggingface.co/google/electra-small-generator/resolve/main/vocab.txt'
        ),
        'google/electra-base-generator': 'https://huggingface.co/google/electra-base-generator/resolve/main/vocab.txt',
        'google/electra-large-generator': (
            'https://huggingface.co/google/electra-large-generator/resolve/main/vocab.txt'
        ),
        'google/electra-small-discriminator': (
            'https://huggingface.co/google/electra-small-discriminator/resolve/main/vocab.txt'
        ),
        'google/electra-base-discriminator': (
            'https://huggingface.co/google/electra-base-discriminator/resolve/main/vocab.txt'
        ),
        'google/electra-large-discriminator': (
            'https://huggingface.co/google/electra-large-discriminator/resolve/main/vocab.txt'
        ),
    },
    'tokenizer_file': {
        'google/electra-small-generator': (
            'https://huggingface.co/google/electra-small-generator/resolve/main/tokenizer.json'
        ),
        'google/electra-base-generator': (
            'https://huggingface.co/google/electra-base-generator/resolve/main/tokenizer.json'
        ),
        'google/electra-large-generator': (
            'https://huggingface.co/google/electra-large-generator/resolve/main/tokenizer.json'
        ),
        'google/electra-small-discriminator': (
            'https://huggingface.co/google/electra-small-discriminator/resolve/main/tokenizer.json'
        ),
        'google/electra-base-discriminator': (
            'https://huggingface.co/google/electra-base-discriminator/resolve/main/tokenizer.json'
        ),
        'google/electra-large-discriminator': (
            'https://huggingface.co/google/electra-large-discriminator/resolve/main/tokenizer.json'
        ),
    },
}

lowercase__					       =	{
    'google/electra-small-generator': 512,
    'google/electra-base-generator': 512,
    'google/electra-large-generator': 512,
    'google/electra-small-discriminator': 512,
    'google/electra-base-discriminator': 512,
    'google/electra-large-discriminator': 512,
}

lowercase__					       =	{
    'google/electra-small-generator': {'do_lower_case': True},
    'google/electra-base-generator': {'do_lower_case': True},
    'google/electra-large-generator': {'do_lower_case': True},
    'google/electra-small-discriminator': {'do_lower_case': True},
    'google/electra-base-discriminator': {'do_lower_case': True},
    'google/electra-large-discriminator': {'do_lower_case': True},
}




class    __snake_case       (     __lowerCAmelCase				):
      a__        =		VOCAB_FILES_NAMES
      a__        =		PRETRAINED_VOCAB_FILES_MAP
      a__        =		PRETRAINED_INIT_CONFIGURATION
      a__        =		PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
      a__        =		ElectraTokenizer



      def __init__(						self    ,			lowercase=None    ,			lowercase=None    ,			lowercase=True    ,			lowercase="[UNK]"    ,			lowercase="[SEP]"    ,			lowercase="[PAD]"    ,			lowercase="[CLS]"    ,			lowercase="[MASK]"    ,			lowercase=True    ,			lowercase=None    ,			**lowercase    ,			)	->			List[Any]:





        '''simple docstring'''





        super().__init__(
            lowercase    ,			tokenizer_file=lowercase    ,			do_lower_case=lowercase    ,			unk_token=lowercase    ,			sep_token=lowercase    ,			pad_token=lowercase    ,			cls_token=lowercase    ,			mask_token=lowercase    ,			tokenize_chinese_chars=lowercase    ,			strip_accents=lowercase    ,			**lowercase    ,			)

        a__:     Any										=	json.loads(self.backend_tokenizer.normalizer.__getstate__())
        if (
            normalizer_state.get('lowercase'    ,			lowercase) != do_lower_case
            or normalizer_state.get('strip_accents'    ,			lowercase) != strip_accents
            or normalizer_state.get('handle_chinese_chars'    ,			lowercase) != tokenize_chinese_chars
        ):
          a__:     Optional[Any]										=	getattr(lowercase    ,			normalizer_state.pop('type'))
          a__:     str										=	do_lower_case
          a__:     Union[str, Any]										=	strip_accents
          a__:     Union[str, Any]										=	tokenize_chinese_chars
          a__:     Any										=	normalizer_class(**lowercase)

        a__:     List[str]										=	do_lower_case



      def   lowerCamelCase_   (						self    ,			lowercase    ,			lowercase=None)	->			int:





        '''simple docstring'''





        a__:     List[Any]										=	[self.cls_token_id] + token_ids_a + [self.sep_token_id]

        if token_ids_a:
          output += token_ids_a + [self.sep_token_id]

        return output



      def   lowerCamelCase_   (						self    ,			lowercase    ,			lowercase = None)	->			List[int]:





        '''simple docstring'''





        a__:     List[Any]										=	[self.sep_token_id]
        a__:     Dict										=	[self.cls_token_id]
        if token_ids_a is None:
          return len(cls + token_ids_a + sep) * [0]
        return len(cls + token_ids_a + sep) * [0] + len(token_ids_a + sep) * [1]



      def   lowerCamelCase_   (						self    ,			lowercase    ,			lowercase = None)	->			Tuple[str]:





        '''simple docstring'''





        a__:     List[Any]										=	self._tokenizer.model.save(lowercase    ,			name=lowercase)
        return tuple(lowercase)



"""simple docstring"""
from typing import TYPE_CHECKING

from ...utils import _LazyModule


lowercase__					       =	{'processing_wav2vec2_with_lm': ['Wav2Vec2ProcessorWithLM']}


if TYPE_CHECKING:
 from .processing_wavaveca_with_lm import WavaVecaProcessorWithLM
else:
 import sys

 lowercase__					       =	_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)


