ó
    pyüi»  ã                   ó¤   • S r SSKrSSKJrJrJrJrJr  SSKJ	r	  SSK
Jr  SSKJr  \R                  " \5      rSS	S
.rS r " S S\5      rS/r\rg)zTokenization classes for Bert.é    N)Ú	TokenizerÚdecodersÚnormalizersÚpre_tokenizersÚ
processors)Ú	WordPieceé   )ÚTokenizersBackend)Úloggingz	vocab.txtztokenizer.json)Ú
vocab_fileÚtokenizer_filec                 óì   • [         R                  " 5       n[        U SSS9 nUR                  5       nSSS5        [	        W5       H  u  pEUR                  S5      nXAU'   M     U$ ! , (       d  f       N9= f)z*Loads a vocabulary file into a dictionary.Úrzutf-8)ÚencodingNÚ
)ÚcollectionsÚOrderedDictÚopenÚ	readlinesÚ	enumerateÚrstrip)r   ÚvocabÚreaderÚtokensÚindexÚtokens         Úg/home/mande/repo/quber/.venv/lib/python3.13/site-packages/transformers/models/bert/tokenization_bert.pyÚ
load_vocabr      sg   € ä×#Ò#Ó%€EÜ	ˆj˜#¨Ò	0°FØ×!Ñ!Ó#ˆ÷ 
1ä! &Ö)‰ˆØ—‘˜TÓ"ˆØˆe‹ñ *ð €L÷ 
1Õ	0ús   ¡A%Á%
A3c                   ó–   ^ • \ rS rSrSr\r/ SQr\r	         SS\
\\
\4   -  S-  S\S\
S\
S	\
S
\
S\
S\S\S-  4U 4S jjjrSrU =r$ )ÚBertTokenizeré)   a:  
Construct a BERT 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 (`str` or `dict[str, int]`, *optional*):
        Custom vocabulary dictionary. If not provided, vocabulary is loaded from `vocab_file`.
    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.
    tokenize_chinese_chars (`bool`, *optional*, defaults to `True`):
        Whether or not to tokenize Chinese characters.
    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).
)Ú	input_idsÚtoken_type_idsÚattention_maskNr   Údo_lower_caseÚ	unk_tokenÚ	sep_tokenÚ	pad_tokenÚ	cls_tokenÚ
mask_tokenÚtokenize_chinese_charsÚstrip_accentsc
                 óú  >• X l         X€l        X�l        Uc9  [        U5      S[        U5      S[        U5      S[        U5      S[        U5      S0nXl        [        [        U R                  [        U5      S95      U l        [        R                  " SUU	US9U R                  l
        [        R                  " 5       U R                  l        [        R                  " S	S
9U R                  l        [         TU ]D  " SUUUUUUUU	S.U
D6  U R$                  b  U R$                  OSnU R&                  b  U R&                  OSn[(        R*                  " [        U R,                  5       S[        U R.                  5       S3[        U R,                  5       S[        U R.                  5       S[        U R.                  5       S3[        U R,                  5      U4[        U R.                  5      U4/S9U R                  l        g )Nr   é   é   r	   é   )r&   T)Ú
clean_textÚhandle_chinese_charsr,   Ú	lowercasez##)Úprefix)r%   r&   r'   r(   r)   r*   r+   r,   z:0 $A:0 z:0z:0 $B:1 z:1)ÚsingleÚpairÚspecial_tokens© )r%   r+   r,   ÚstrÚ_vocabr   r   Ú
_tokenizerr   ÚBertNormalizerÚ
normalizerr   ÚBertPreTokenizerÚpre_tokenizerr   ÚdecoderÚsuperÚ__init__Úcls_token_idÚsep_token_idr   ÚTemplateProcessingr)   r'   Úpost_processor)Úselfr   r%   r&   r'   r(   r)   r*   r+   r,   ÚkwargsrC   rD   Ú	__class__s                €r   rB   ÚBertTokenizer.__init__O   sÃ  ø€ ð +ÔØ&<Ô#Ø*ÔØ‰=ä�I“ Ü�I“ Ü�I“ Ü�I“ Ü�J“ ðˆEð ŒÜ#¤I¨d¯k©kÄSÈÃ^Ñ$TÓUˆŒÜ%0×%?Ò%?ØØ!7Ø'Ø#ñ	&
ˆ�‰Ô"ô )7×(GÒ(GÓ(Iˆ�‰Ô%Ü"*×"4Ò"4¸DÑ"Aˆ�‰ÔÜ‰Òð 
	
Ø'ØØØØØ!Ø#9Ø'ñ
	
ð ò
	
ð -1×,=Ñ,=Ñ,I�t×(Ò(ÈqˆØ,0×,=Ñ,=Ñ,I�t×(Ò(Èqˆä)3×)FÒ)FÜ˜$Ÿ.™.Ó)Ð*¨(´3°t·~±~Ó3FÐ2GÀrÐJÜ˜Ÿ™Ó'Ð(¨´°T·^±^Ó1DÐ0EÀXÌcÐRV×R`ÑR`ÓNaÐMbÐbdÐeä�T—^‘^Ó$ lÐ3Ü�T—^‘^Ó$ lÐ3ðñ*
ˆ�‰Õ&ó    )r;   r:   r%   r,   r+   )	NTz[UNK]z[SEP]z[PAD]z[CLS]z[MASK]TN)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__ÚVOCAB_FILES_NAMESÚvocab_files_namesÚmodel_input_namesr   Úmodelr9   ÚdictÚintÚboolrB   Ú__static_attributes__Ú__classcell__)rI   s   @r   r    r    )   s±   ø† ñðB *ÐÚIÐØ€Eð .2Ø"Ø Ø Ø Ø Ø"Ø'+Ø%)ñ8
à�T˜#˜s˜(‘^Ñ# dÑ*ð8
ð ð8
ð ð	8
ð
 ð8
ð ð8
ð ð8
ð ð8
ð !%ð8
ð ˜d‘{÷8
ö 8
rK   r    )rP   r   Ú
tokenizersr   r   r   r   r   Útokenizers.modelsr   Útokenization_utils_tokenizersr
   Úutilsr   Ú
get_loggerrL   ÚloggerrQ   r   r    Ú__all__ÚBertTokenizerFastr8   rK   r   Ú<module>rb      s_   ðñ %ã ç SÕ SÝ 'å >Ý ð 
×	Ò	˜HÓ	%€à#.ÐBRÑSÐ òô^
Ð%ô ^
ðB Ð
€à!Ñ rK   