§
    ‚Štjˆ  ã                   óœ   — d Z ddlmZmZmZmZmZ ddlmZ ddl	m
Z
 ddlmZ  ej        e¦  «        ZddiZg d	¢Z G d
„ de
¦  «        ZdgZdS )z*Tokenization class for Funnel Transformer.é    )Ú	TokenizerÚdecodersÚnormalizersÚpre_tokenizersÚ
processors)Ú	WordPieceé   )ÚTokenizersBackend)ÚloggingÚ
vocab_filez	vocab.txt)
Úsmallz
small-baseÚmediumzmedium-baseÚintermediatezintermediate-baseÚlargez
large-baseÚxlargezxlarge-basec                   ó®   ‡ — e Zd ZU dZeZeZdZe	e
d<   	 	 	 	 	 	 	 	 	 	 	 	 	 ddeeee	f         z  dz  dedededededededededededz  defˆ fd„Zˆ xZS )ÚFunnelTokenizeraf  
    Construct a Funnel Transformer tokenizer (backed by HuggingFace's tokenizers library). Based on WordPiece.

    This tokenizer inherits from [`TokenizersBackend`] which contains most of the main methods. Users should
    refer to this superclass for more information regarding those methods.

    Args:
        vocab_file (`str`):
            File containing the vocabulary.
        do_lower_case (`bool`, *optional*, defaults to `True`):
            Whether or not to lowercase the input when tokenizing.
        unk_token (`str`, *optional*, defaults to `"<unk>"`):
            The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
            token instead.
        sep_token (`str`, *optional*, defaults to `"<sep>"`):
            The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
            sequence classification or for a text and a question for question answering. It is also used as the last
            token of a sequence built with special tokens.
        pad_token (`str`, *optional*, defaults to `"<pad>"`):
            The token used for padding, for example when batching sequences of different lengths.
        cls_token (`str`, *optional*, defaults to `"<cls>"`):
            The classifier token which is used when doing sequence classification (classification of the whole sequence
            instead of per-token classification). It is the first token of the sequence when built with special tokens.
        mask_token (`str`, *optional*, defaults to `"<mask>"`):
            The token used for masking values. This is the token used when training this model with masked language
            modeling. This is the token which the model will try to predict.
        clean_text (`bool`, *optional*, defaults to `True`):
            Whether or not to clean the text before tokenization by removing any control characters and replacing all
            whitespaces by the classic one.
        tokenize_chinese_chars (`bool`, *optional*, defaults to `True`):
            Whether or not to tokenize Chinese characters. This should likely be deactivated for Japanese (see [this
            issue](https://github.com/huggingface/transformers/issues/328)).
        bos_token (`str`, `optional`, defaults to `"<s>"`):
            The beginning of sentence token.
        eos_token (`str`, `optional`, defaults to `"</s>"`):
            The end of sentence token.
        strip_accents (`bool`, *optional*):
            Whether or not to strip all accents. If this option is not specified, then it will be determined by the
            value for `lowercase` (as in the original BERT).
        wordpieces_prefix (`str`, *optional*, defaults to `"##"`):
            The prefix for subwords.
        vocab (`str` or `dict[str, int]`, *optional*):
            Custom vocabulary dictionary.
    é   Úcls_token_type_idNTú<unk>ú<sep>ú<pad>ú<cls>ú<mask>ú<s>ú</s>ú##ÚvocabÚdo_lower_caseÚ	unk_tokenÚ	sep_tokenÚ	pad_tokenÚ	cls_tokenÚ
mask_tokenÚ	bos_tokenÚ	eos_tokenÚ
clean_textÚtokenize_chinese_charsÚstrip_accentsÚwordpieces_prefixc                 ó\  •— || _         || _        || _        |
| _        || _        |�|njt          |¦  «        dt          |¦  «        dt          |¦  «        dt          |¦  «        dt          |¦  «        dt          |¦  «        dt          |	¦  «        di| _        t          t          | j        t          |¦  «        ¬¦  «        ¦  «        | _	        t          j        |
|||¬	¦  «        | j	        _        t          j        ¦   «         | j	        _        t!          j        |¬
¦  «        | j	        _         t%          ¦   «         j        d||||||||	|
|||dœ|¤Ž t)          j        |› d|› d�|› d|› d|› d�t          |¦  «        | j        ft          |¦  «        | j        fg¬¦  «        | j	        _        d S )Nr   é   r   r	   é   é   é   )r    )r'   Úhandle_chinese_charsr)   Ú	lowercase)Úprefix)r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   z:2 $A:0 z:0z:0 $B:1 z:1)ÚsingleÚpairÚspecial_tokens© )r   r(   r)   r'   r*   ÚstrÚ_vocabr   r   Ú
_tokenizerr   ÚBertNormalizerÚ
normalizerr   ÚBertPreTokenizerÚpre_tokenizerr   ÚdecoderÚsuperÚ__init__r   ÚTemplateProcessingÚcls_token_idÚsep_token_idÚpost_processor)Úselfr   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   ÚkwargsÚ	__class__s                  €úl/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/transformers/models/funnel/tokenization_funnel.pyr@   zFunnelTokenizer.__init__[   sà  ø€ ð" +ˆÔØ&<ˆÔ#Ø*ˆÔØ$ˆŒØ!2ˆÔð Ð ð ˆEõ �I‘” Ý�I‘” Ý�I‘” Ý�I‘” Ý�J‘” Ý�I‘” Ý�I‘” ðð 	Œõ $¥I¨d¬kÅSÈÁ^Ä^Ð$TÑ$TÔ$TÑUÔUˆŒå%0Ô%?Ø!Ø!7Ø'Ø#ð	&
ñ &
ô &
ˆŒÔ"õ )7Ô(GÑ(IÔ(IˆŒÔ%Ý"*Ô"4Ð<MÐ"NÑ"NÔ"NˆŒÔà�‰ŒÔð 	
Ø'ØØØØØ!ØØØ!Ø#9Ø'Ø/ð	
ð 	
ð ð	
ð 	
ð 	
õ *4Ô)FØÐ6Ð6¨Ð6Ð6Ð6ØÐGÐG yÐGÐG¸)ÐGÐGÐGå�Y‘” Ô!2Ð3Ý�Y‘” Ô!2Ð3ðð*
ñ *
ô *
ˆŒÔ&Ð&Ð&ó    )NTr   r   r   r   r   r   r   TTNr   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚVOCAB_FILES_NAMESÚvocab_files_namesr   Úmodelr   ÚintÚ__annotations__r7   ÚdictÚboolr@   Ú__classcell__)rG   s   @rH   r   r   )   sD  ø€ € € € € € ð+ð +ðZ *ÐØ€EØÐ�sÐÐÑð .2Ø"Ø Ø Ø Ø Ø"ØØØØ'+Ø%)Ø!%ðF
ð F
à�T˜#˜s˜(”^Ñ# dÑ*ðF
ð ðF
ð ð	F
ð
 ðF
ð ðF
ð ðF
ð ðF
ð ðF
ð ðF
ð ðF
ð !%ðF
ð ˜d‘{ðF
ð ðF
ð F
ð F
ð F
ð F
ð F
ð F
ð F
ð F
ð F
rI   r   N)rM   Ú
tokenizersr   r   r   r   r   Útokenizers.modelsr   Útokenization_utils_tokenizersr
   Úutilsr   Ú
get_loggerrJ   ÚloggerrN   Ú_model_namesr   Ú__all__r6   rI   rH   ú<module>r^      sß   ðð 1Ð 0à SÐ SÐ SÐ SÐ SÐ SÐ SÐ SÐ SÐ SÐ SÐ SÐ SÐ SØ 'Ð 'Ð 'Ð 'Ð 'Ð 'à >Ð >Ð >Ð >Ð >Ð >Ø Ð Ð Ð Ð Ð ð 
ˆÔ	˜HÑ	%Ô	%€à! ;Ð/Ð ðð ð €ðx
ð x
ð x
ð x
ð x
Ð'ñ x
ô x
ð x
ðv Ð
€€€rI   