Ë
    S^(h³Q  ã                   óÖ   — d Z ddlZddlZddlZddlmZmZmZ ddlm	Z	m
Z
mZmZ ddlmZ  ej                  e«      ZddiZd	„ Zd
„ Z G d„ de	«      Z G d„ d«      Z G d„ d«      Zg d¢Zy)zTokenization classes for Bert.é    N)ÚListÚOptionalÚTupleé   )ÚPreTrainedTokenizerÚ_is_controlÚ_is_punctuationÚ_is_whitespace)ÚloggingÚ
vocab_filez	vocab.txtc                 óæ   — t        j                  «       }t        | dd¬«      5 }|j                  «       }ddd«       t	        «      D ]  \  }}|j                  d«      }|||<   Œ |S # 1 sw Y   Œ4xY w)z*Loads a vocabulary file into a dictionary.Úrúutf-8©ÚencodingNú
)ÚcollectionsÚOrderedDictÚopenÚ	readlinesÚ	enumerateÚrstrip)r   ÚvocabÚreaderÚtokensÚindexÚtokens         úh/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/transformers/models/bert/tokenization_bert.pyÚ
load_vocabr      sw   € ä×#Ñ#Ó%€EÜ	ˆj˜#¨Ô	0ð $°FØ×!Ñ!Ó#ˆ÷$ä! &Ó)ò ‰ˆˆuØ—‘˜TÓ"ˆØˆˆeŠðð €L÷$ð $ús   £A'Á'A0c                 óN   — | j                  «       } | sg S | j                  «       }|S )z@Runs basic whitespace cleaning and splitting on a piece of text.)ÚstripÚsplit)Útextr   s     r   Úwhitespace_tokenizer$   *   s%   € à�:‰:‹<€DÙØˆ	Ø�Z‰Z‹\€FØ€Mó    c            
       ó8  ‡ — e Zd ZdZeZ	 	 	 	 	 	 	 	 	 	 	 dˆ fd„	Zed„ «       Zed„ «       Z	d„ Z
dd„Zd„ Zd„ Zd	„ Z	 dd
ee   deee      dee   fd„Z	 dd
ee   deee      dedee   fˆ fd„Z	 dd
ee   deee      dee   fd„Zddedee   dee   fd„Zˆ xZS )ÚBertTokenizeraæ
  
    Construct a BERT tokenizer. Based on WordPiece.

    This tokenizer inherits from [`PreTrainedTokenizer`] 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.
        do_basic_tokenize (`bool`, *optional*, defaults to `True`):
            Whether or not to do basic tokenization before WordPiece.
        never_split (`Iterable`, *optional*):
            Collection of tokens which will never be split during tokenization. Only has an effect when
            `do_basic_tokenize=True`
        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.

            This should likely be deactivated for Japanese (see this
            [issue](https://github.com/huggingface/transformers/issues/328)).
        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).
        clean_up_tokenization_spaces (`bool`, *optional*, defaults to `True`):
            Whether or not to cleanup spaces after decoding, cleanup consists in removing potential artifacts like
            extra spaces.
    c                 óÖ  •— t         j                  j                  |«      st        d|› d�«      ‚t	        |«      | _        t        j                  | j
                  j                  «       D ��cg c]	  \  }}||f‘Œ c}}«      | _	        || _
        |rt        |||
|¬«      | _        t        | j
                  t        |«      ¬«      | _        t!        ‰| �D  d||||||||	|
||dœ|¤Ž y c c}}w )Nz&Can't find a vocabulary file at path 'z'. To load the vocabulary from a Google pretrained model use `tokenizer = BertTokenizer.from_pretrained(PRETRAINED_MODEL_NAME)`)Údo_lower_caseÚnever_splitÚtokenize_chinese_charsÚstrip_accents)r   Ú	unk_token)r)   Údo_basic_tokenizer*   r-   Ú	sep_tokenÚ	pad_tokenÚ	cls_tokenÚ
mask_tokenr+   r,   Úclean_up_tokenization_spaces© )ÚosÚpathÚisfileÚ
ValueErrorr   r   r   r   ÚitemsÚids_to_tokensr.   ÚBasicTokenizerÚbasic_tokenizerÚWordpieceTokenizerÚstrÚwordpiece_tokenizerÚsuperÚ__init__)Úselfr   r)   r.   r*   r-   r/   r0   r1   r2   r+   r,   r3   ÚkwargsÚtokÚidsÚ	__class__s                   €r   rA   zBertTokenizer.__init__b   sý   ø€ ô  �w‰w�~‰~˜jÔ)ÜØ8¸¸ð E`ð `óð ô   
Ó+ˆŒ
Ü(×4Ñ4ÐQU×Q[ÑQ[×QaÑQaÓQc×5dÁXÀSÈ#°s¸C²jÓ5dÓeˆÔØ!2ˆÔÙÜ#1Ø+Ø'Ø'=Ø+ô	$ˆDÔ ô $6¸D¿J¹JÔRUÐV_ÓR`Ô#aˆÔ ä‰Ñð 	
Ø'Ø/Ø#ØØØØØ!Ø#9Ø'Ø)Eñ	
ð ó	
ùó 6es   Á,C%
c                 ó.   — | j                   j                  S ©N)r<   r)   ©rB   s    r   r)   zBertTokenizer.do_lower_case“   s   € à×#Ñ#×1Ñ1Ð1r%   c                 ó,   — t        | j                  «      S rH   )Úlenr   rI   s    r   Ú
vocab_sizezBertTokenizer.vocab_size—   s   € ä�4—:‘:‹Ðr%   c                 óB   — t        | j                  fi | j                  ¤ŽS rH   )Údictr   Úadded_tokens_encoderrI   s    r   Ú	get_vocabzBertTokenizer.get_vocab›   s   € Ü�D—J‘JÑ< $×";Ñ";Ñ<Ð<r%   c                 óL  — g }| j                   rz| j                  j                  ||s| j                  nd ¬«      D ]J  }|| j                  j                  v r|j                  |«       Œ-|| j                  j                  |«      z  }ŒL |S | j                  j                  |«      }|S )N)r*   )r.   r<   ÚtokenizeÚall_special_tokensr*   Úappendr?   )rB   r#   Úsplit_special_tokensÚsplit_tokensr   s        r   Ú	_tokenizezBertTokenizer._tokenizež   s­   € ØˆØ×!Ò!Ø×-Ñ-×6Ñ6ØÑAU $×"9Ò"9Ð[_ð 7ó ò M�ð ˜D×0Ñ0×<Ñ<Ñ<Ø ×'Ñ'¨Õ.à  D×$<Ñ$<×$EÑ$EÀeÓ$LÑL‘LðMð Ðð  ×3Ñ3×<Ñ<¸TÓBˆLØÐr%   c                 ó€   — | j                   j                  || j                   j                  | j                  «      «      S )z0Converts a token (str) in an id using the vocab.)r   Úgetr-   )rB   r   s     r   Ú_convert_token_to_idz"BertTokenizer._convert_token_to_id­   s(   € à�z‰z�~‰~˜e T§Z¡Z§^¡^°D·N±NÓ%CÓDÐDr%   c                 óN   — | j                   j                  || j                  «      S )z=Converts an index (integer) in a token (str) using the vocab.)r:   rY   r-   )rB   r   s     r   Ú_convert_id_to_tokenz"BertTokenizer._convert_id_to_token±   s   € à×!Ñ!×%Ñ% e¨T¯^©^Ó<Ð<r%   c                 ód   — dj                  |«      j                  dd«      j                  «       }|S )z:Converts a sequence of tokens (string) in a single string.ú z ##Ú )ÚjoinÚreplacer!   )rB   r   Ú
out_strings      r   Úconvert_tokens_to_stringz&BertTokenizer.convert_tokens_to_stringµ   s,   € à—X‘X˜fÓ%×-Ñ-¨e°RÓ8×>Ñ>Ó@ˆ
ØÐr%   Útoken_ids_0Útoken_ids_1Úreturnc                 ó’   — |€| j                   g|z   | j                  gz   S | j                   g}| j                  g}||z   |z   |z   |z   S )a–  
        Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
        adding special tokens. A BERT sequence has the following format:

        - single sequence: `[CLS] X [SEP]`
        - pair of sequences: `[CLS] A [SEP] B [SEP]`

        Args:
            token_ids_0 (`List[int]`):
                List of IDs to which the special tokens will be added.
            token_ids_1 (`List[int]`, *optional*):
                Optional second list of IDs for sequence pairs.

        Returns:
            `List[int]`: List of [input IDs](../glossary#input-ids) with the appropriate special tokens.
        )Úcls_token_idÚsep_token_id)rB   rd   re   ÚclsÚseps        r   Ú build_inputs_with_special_tokensz.BertTokenizer.build_inputs_with_special_tokensº   sb   € ð& ÐØ×%Ñ%Ð&¨Ñ4¸×8IÑ8IÐ7JÑJÐJØ× Ñ Ð!ˆØ× Ñ Ð!ˆØ�[Ñ  3Ñ&¨Ñ4°sÑ:Ð:r%   Úalready_has_special_tokensc                 ó´   •— |rt         ‰| �  ||d¬«      S |�+dgdgt        |«      z  z   dgz   dgt        |«      z  z   dgz   S dgdgt        |«      z  z   dgz   S )aÄ  
        Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
        special tokens using the tokenizer `prepare_for_model` method.

        Args:
            token_ids_0 (`List[int]`):
                List of IDs.
            token_ids_1 (`List[int]`, *optional*):
                Optional second list of IDs for sequence pairs.
            already_has_special_tokens (`bool`, *optional*, defaults to `False`):
                Whether or not the token list is already formatted with special tokens for the model.

        Returns:
            `List[int]`: A list of integers in the range [0, 1]: 1 for a special token, 0 for a sequence token.
        T)rd   re   rm   é   r   )r@   Úget_special_tokens_maskrK   )rB   rd   re   rm   rF   s       €r   rp   z%BertTokenizer.get_special_tokens_maskÓ   s‰   ø€ ñ& &Ü‘7Ñ2Ø'°[Ð]að 3ó ð ð Ð"Ø�3˜1˜#¤ KÓ 0Ñ0Ñ1°Q°CÑ7¸A¸3ÄÀ[ÓAQÑ;QÑRÐVWÐUXÑXÐXØˆs�q�cœC Ó,Ñ,Ñ-°°Ñ3Ð3r%   c                 ó´   — | j                   g}| j                  g}|€t        ||z   |z   «      dgz  S t        ||z   |z   «      dgz  t        ||z   «      dgz  z   S )aÑ  
        Create a mask from the two sequences passed to be used in a sequence-pair classification task. A BERT sequence
        pair mask has the following format:

        ```
        0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1
        | first sequence    | second sequence |
        ```

        If `token_ids_1` is `None`, this method only returns the first portion of the mask (0s).

        Args:
            token_ids_0 (`List[int]`):
                List of IDs.
            token_ids_1 (`List[int]`, *optional*):
                Optional second list of IDs for sequence pairs.

        Returns:
            `List[int]`: List of [token type IDs](../glossary#token-type-ids) according to the given sequence(s).
        r   ro   )ri   rh   rK   )rB   rd   re   rk   rj   s        r   Ú$create_token_type_ids_from_sequencesz2BertTokenizer.create_token_type_ids_from_sequencesï   st   € ð. × Ñ Ð!ˆØ× Ñ Ð!ˆØÐÜ�s˜[Ñ(¨3Ñ.Ó/°1°#Ñ5Ð5Ü�3˜Ñ$ sÑ*Ó+¨q¨cÑ1´C¸ÀcÑ8IÓ4JÈaÈSÑ4PÑPÐPr%   Úsave_directoryÚfilename_prefixc                 óà  — d}t         j                  j                  |«      r2t         j                  j                  ||r|dz   ndt        d   z   «      }n|r|dz   nd|z   }t        |dd¬«      5 }t        | j                  j                  «       d„ ¬	«      D ]>  \  }}||k7  rt        j                  d
|› d�«       |}|j                  |dz   «       |dz  }Œ@ 	 d d d «       |fS # 1 sw Y   |fS xY w)Nr   ú-r_   r   Úwr   r   c                 ó   — | d   S )Nro   r4   )Úkvs    r   ú<lambda>z/BertTokenizer.save_vocabulary.<locals>.<lambda>  s   € ÐPRÐSTÑPU€ r%   )ÚkeyzSaving vocabulary to z\: vocabulary indices are not consecutive. Please check that the vocabulary is not corrupted!r   ro   )r5   r6   Úisdirr`   ÚVOCAB_FILES_NAMESr   Úsortedr   r9   ÚloggerÚwarningÚwrite)rB   rs   rt   r   r   Úwriterr   Útoken_indexs           r   Úsave_vocabularyzBertTokenizer.save_vocabulary  sû   € ØˆÜ�7‰7�=‰=˜Ô(ÜŸ™Ÿ™Ø¹/ °3Ò!6ÈrÔUfÐgsÑUtÑ tó‰Jñ 4C˜/¨CÒ/ÈÈnÑ\ˆJÜ�*˜c¨GÔ4ð 		¸Ü&,¨T¯Z©Z×-=Ñ-=Ó-?ÑEUÔ&Vò Ñ"��{Ø˜KÒ'Ü—N‘NØ/°
¨|ð <Nð Nôð (�EØ—‘˜U T™\Ô*Ø˜‘
‘ñ÷		ð ˆ}Ð÷		ð ˆ}Ðús   Á.A(C"Ã"C-)TTNz[UNK]z[SEP]z[PAD]z[CLS]z[MASK]TNT)FrH   )NF)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r}   Úvocab_files_namesrA   Úpropertyr)   rL   rP   rW   rZ   r\   rc   r   Úintr   rl   Úboolrp   rr   r>   r   r„   Ú__classcell__)rF   s   @r   r'   r'   3   sL  ø„ ñ*ðX *Ðð
 ØØØØØØØØ#ØØ%)õ/
ðb ñ2ó ð2ð ñó ðò=óòEò=òð JNñ;Ø ™9ð;Ø3;¸DÀ¹IÑ3Fð;à	ˆc‰ó;ð4 sxñ4Ø ™9ð4Ø3;¸DÀ¹IÑ3Fð4Økoð4à	ˆc‰õ4ð: JNñQØ ™9ðQØ3;¸DÀ¹IÑ3FðQà	ˆc‰óQñ:¨cð ÀHÈSÁMð Ð]bÐcfÑ]g÷ r%   r'   c                   óJ   — e Zd ZdZ	 	 	 	 	 d
d„Zdd„Zd„ Zdd„Zd„ Zd„ Z	d	„ Z
y)r;   aª  
    Constructs a BasicTokenizer that will run basic tokenization (punctuation splitting, lower casing, etc.).

    Args:
        do_lower_case (`bool`, *optional*, defaults to `True`):
            Whether or not to lowercase the input when tokenizing.
        never_split (`Iterable`, *optional*):
            Collection of tokens which will never be split during tokenization. Only has an effect when
            `do_basic_tokenize=True`
        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)).
        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).
        do_split_on_punc (`bool`, *optional*, defaults to `True`):
            In some instances we want to skip the basic punctuation splitting so that later tokenization can capture
            the full context of the words, such as contractions.
    Nc                 ód   — |€g }|| _         t        |«      | _        || _        || _        || _        y rH   )r)   Úsetr*   r+   r,   Údo_split_on_punc)rB   r)   r*   r+   r,   r‘   s         r   rA   zBasicTokenizer.__init__8  s<   € ð ÐØˆKØ*ˆÔÜ˜{Ó+ˆÔØ&<ˆÔ#Ø*ˆÔØ 0ˆÕr%   c                 óJ  — |r$| j                   j                  t        |«      «      n| j                   }| j                  |«      }| j                  r| j                  |«      }t        j                  d|«      }t        |«      }g }|D ]€  }||vrY| j                  r0|j                  «       }| j                  dur/| j                  |«      }n| j                  r| j                  |«      }|j                  | j                  ||«      «       Œ‚ t        dj                  |«      «      }|S )aj  
        Basic Tokenization of a piece of text. For sub-word tokenization, see WordPieceTokenizer.

        Args:
            never_split (`List[str]`, *optional*)
                Kept for backward compatibility purposes. Now implemented directly at the base class level (see
                [`PreTrainedTokenizer.tokenize`]) List of token not to split.
        ÚNFCFr^   )r*   Úunionr�   Ú_clean_textr+   Ú_tokenize_chinese_charsÚunicodedataÚ	normalizer$   r)   Úlowerr,   Ú_run_strip_accentsÚextendÚ_run_split_on_puncr`   )rB   r#   r*   Úunicode_normalized_textÚorig_tokensrV   r   Úoutput_tokenss           r   rR   zBasicTokenizer.tokenizeH  s  € ñ CN�d×&Ñ&×,Ñ,¬S°Ó-=Ô>ÐSW×ScÑScˆØ×Ñ Ó%ˆð ×&Ò&Ø×/Ñ/°Ó5ˆDä"-×"7Ñ"7¸¸tÓ"DÐÜ)Ð*AÓBˆØˆØ ò 	MˆEØ˜KÑ'Ø×%Ò%Ø!ŸK™K›M�EØ×)Ñ)°Ñ6Ø $× 7Ñ 7¸Ó >™Ø×'Ò'Ø ×3Ñ3°EÓ:�EØ×Ñ × 7Ñ 7¸¸{Ó KÕLð	Mô ,¨C¯H©H°\Ó,BÓCˆØÐr%   c                 óº   — t        j                  d|«      }g }|D ].  }t        j                  |«      }|dk(  rŒ|j                  |«       Œ0 dj	                  |«      S )z$Strips accents from a piece of text.ÚNFDÚMnr_   )r—   r˜   ÚcategoryrT   r`   )rB   r#   ÚoutputÚcharÚcats        r   rš   z!BasicTokenizer._run_strip_accentsn  s^   € ä×$Ñ$ U¨DÓ1ˆØˆØò 	 ˆDÜ×&Ñ& tÓ,ˆCØ�dŠ{ØØ�M‰M˜$Õð		 ð
 �w‰w�v‹Ðr%   c                 óv  — | j                   r|�||v r|gS t        |«      }d}d}g }|t        |«      k  rb||   }t        |«      r|j	                  |g«       d}n)|r|j	                  g «       d}|d   j	                  |«       |dz  }|t        |«      k  rŒb|D �cg c]  }dj                  |«      ‘Œ c}S c c}w )z&Splits punctuation on a piece of text.r   TFéÿÿÿÿro   r_   )r‘   ÚlistrK   r	   rT   r`   )	rB   r#   r*   ÚcharsÚiÚstart_new_wordr¤   r¥   Úxs	            r   rœ   z!BasicTokenizer._run_split_on_puncy  s¿   € à×$Ò$¨Ð)@ÀTÈ[ÑEXØ�6ˆMÜ�T“
ˆØˆØˆØˆØ”#�e“*ŠnØ˜‘8ˆDÜ˜tÔ$Ø—‘˜t˜fÔ%Ø!%‘á!Ø—M‘M "Ô%Ø!&�Ø�r‘
×!Ñ! $Ô'Ø�‰FˆAð ”#�e“*‹nð %+Ö+˜q�—‘˜•
Ò+Ð+ùÒ+s   ÂB6c                 óø   — g }|D ]c  }t        |«      }| j                  |«      r4|j                  d«       |j                  |«       |j                  d«       ŒS|j                  |«       Œe dj                  |«      S )z)Adds whitespace around any CJK character.r^   r_   )ÚordÚ_is_chinese_charrT   r`   ©rB   r#   r¤   r¥   Úcps        r   r–   z&BasicTokenizer._tokenize_chinese_chars�  sm   € àˆØò 	$ˆDÜ�T“ˆBØ×$Ñ$ RÔ(Ø—‘˜cÔ"Ø—‘˜dÔ#Ø—‘˜cÕ"à—‘˜dÕ#ð	$ð �w‰w�v‹Ðr%   c                 ó¦   — |dk\  r|dk  sF|dk\  r|dk  s<|dk\  r|dk  s2|dk\  r|dk  s(|d	k\  r|d
k  s|dk\  r|dk  s|dk\  r|dk  s
|dk\  r|dk  ryy)z6Checks whether CP is the codepoint of a CJK character.i N  iÿŸ  i 4  i¿M  i   iß¦ i § i?· i@· i¸ i ¸ i¯Î i ù  iÿú  i ø iú TFr4   )rB   r²   s     r   r°   zBasicTokenizer._is_chinese_charœ  sr   € ð �6Š\˜b FšlØ�f’  v¢Ø�g’ "¨¢-Ø�g’ "¨¢-Ø�g’ "¨¢-Ø�g’ "¨¢-Ø�f’  v¢Ø�g’ "¨¢-ààr%   c                 óÔ   — g }|D ]Q  }t        |«      }|dk(  s|dk(  st        |«      rŒ$t        |«      r|j                  d«       ŒA|j                  |«       ŒS dj	                  |«      S )zBPerforms invalid character removal and whitespace cleanup on text.r   iýÿ  r^   r_   )r¯   r   r
   rT   r`   r±   s        r   r•   zBasicTokenizer._clean_text´  sf   € àˆØò 	$ˆDÜ�T“ˆBØ�QŠw˜" š,¬+°dÔ*;ØÜ˜dÔ#Ø—‘˜cÕ"à—‘˜dÕ#ð	$ð �w‰w�v‹Ðr%   )TNTNTrH   )r…   r†   r‡   rˆ   rA   rR   rš   rœ   r–   r°   r•   r4   r%   r   r;   r;   !  s<   „ ñð0 ØØ#ØØó1ó $òL	ó,ò,òó0r%   r;   c                   ó   — e Zd ZdZdd„Zd„ Zy)r=   zRuns WordPiece tokenization.c                 ó.   — || _         || _        || _        y rH   )r   r-   Úmax_input_chars_per_word)rB   r   r-   r·   s       r   rA   zWordpieceTokenizer.__init__Å  s   € ØˆŒ
Ø"ˆŒØ(@ˆÕ%r%   c                 ó  — g }t        |«      D ]÷  }t        |«      }t        |«      | j                  kD  r|j	                  | j
                  «       ŒBd}d}g }|t        |«      k  rst        |«      }d}	||k  r:dj                  ||| «      }
|dkD  rd|
z   }
|
| j                  v r|
}	n|dz  }||k  rŒ:|	€d}n"|j	                  |	«       |}|t        |«      k  rŒs|r|j	                  | j
                  «       Œç|j                  |«       Œù |S )aå  
        Tokenizes a piece of text into its word pieces. This uses a greedy longest-match-first algorithm to perform
        tokenization using the given vocabulary.

        For example, `input = "unaffable"` wil return as output `["un", "##aff", "##able"]`.

        Args:
            text: A single token or whitespace separated tokens. This should have
                already been passed through *BasicTokenizer*.

        Returns:
            A list of wordpiece tokens.
        Fr   Nr_   z##ro   T)	r$   r©   rK   r·   rT   r-   r`   r   r›   )rB   r#   rŸ   r   rª   Úis_badÚstartÚ
sub_tokensÚendÚ
cur_substrÚsubstrs              r   rR   zWordpieceTokenizer.tokenizeÊ  s&  € ð ˆÜ(¨Ó.ò 	1ˆEÜ˜“KˆEÜ�5‹z˜D×9Ñ9Ò9Ø×$Ñ$ T§^¡^Ô4ØàˆFØˆEØˆJØœ#˜e›*Ò$Ü˜%“j�Ø!�
Ø˜c’kØŸW™W U¨5°Ð%5Ó6�FØ˜q’yØ!%¨¡˜Ø §¡Ñ+Ø%+˜
ØØ˜1‘H�Cð ˜c“kð Ð%Ø!�FØØ×!Ñ! *Ô-Ø�ð œ#˜e›*Ó$ñ" Ø×$Ñ$ T§^¡^Õ4à×$Ñ$ ZÕ0ð;	1ð< Ðr%   N)éd   )r…   r†   r‡   rˆ   rA   rR   r4   r%   r   r=   r=   Â  s   „ Ù&óAó
.r%   r=   )r;   r'   r=   )rˆ   r   r5   r—   Útypingr   r   r   Útokenization_utilsr   r   r	   r
   Úutilsr   Ú
get_loggerr…   r   r}   r   r$   r'   r;   r=   Ú__all__r4   r%   r   ú<module>rÅ      s{   ðñ %ã Û 	Û ß (Ñ (ç cÓ cÝ ð 
ˆ×	Ñ	˜HÓ	%€à! ;Ð/Ð òòôkÐ'ô k÷\^ñ ^÷B6ñ 6òr D�r%   