Ë
    S^(h–º  ã                   óZ  — d Z ddlZddlZddlZddlZddlmZ ddlmZm	Z	m
Z
mZ ddlmZmZmZmZmZmZmZmZmZmZmZmZmZ ddlmZmZmZmZ  ej>                  e «      Z!dZ"d	Z#d
Z$ G d„ d«      Z% G d„ de%«      Z&d„ Z'd„ Z(d„ Z)d„ Z*d„ Z+de,e-   de-fd„Z. ee«       G d„ de«      «       Z/y)z�
Tokenization classes for python tokenizers. For fast tokenizers (provided by HuggingFace's tokenizers library) see
tokenization_utils_fast.py
é    N)ÚOrderedDict)ÚAnyÚOptionalÚUnionÚoverloadé   )ÚENCODE_KWARGS_DOCSTRINGÚ'ENCODE_PLUS_ADDITIONAL_KWARGS_DOCSTRINGÚINIT_TOKENIZER_DOCSTRINGÚ
AddedTokenÚBatchEncodingÚEncodedInputÚEncodedInputPairÚPreTokenizedInputÚPreTokenizedInputPairÚPreTrainedTokenizerBaseÚ	TextInputÚTextInputPairÚTruncationStrategy)ÚPaddingStrategyÚ
TensorTypeÚadd_end_docstringsÚloggingzspecial_tokens_map.jsonzadded_tokens.jsonztokenizer_config.jsonc                   óD   — e Zd ZdZd„ Zd„ Zdefd„Zdedee   fd„Z	d	„ Z
y
)ÚTriez¯
    Trie in Python. Creates a Trie out of a list of words. The trie is used to split on `added_tokens` in one pass
    Loose reference https://en.wikipedia.org/wiki/Trie
    c                 ó\   — i | _         t        «       | _        d| _         | j                  |Ž  y )NÚ )ÚdataÚsetÚ_tokensÚ_termination_charÚupdate)ÚselfÚargss     ú]/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/transformers/tokenization_utils.pyÚ__init__zTrie.__init__:   s(   € ØˆŒ	Ü“uˆŒØ!#ˆÔØˆ�‰�TÒó    c                 ó@   — t        |Ž D ]  }| j                  |«       Œ y)z�
        Updates the Trie with new tokens provided as arguments.

        Args:
            *args: Variable number of words to be added to the Trie.
        N)ÚtupleÚadd)r#   r$   Útokens      r%   r"   zTrie.update@   s"   € ô ˜D�\ò 	ˆEØ�H‰H�U�Oñ	r'   Úwordc                 ó¸   — |sy| j                   j                  |«       | j                  }|D ]  }|j                  |i «      ||<   ||   }Œ d|| j                  <   y)u•  
        Passes over every char (utf-8 char) on word and recursively adds it to the internal `data` trie representation.
        The special key `""` in `self._termination_char` is used to represent termination.

        This function is idempotent, adding twice the same word will leave the trie unchanged

        Example:

        ```python
        >>> trie = Trie()
        >>> trie.add("Hello å�‹é�”")
        >>> trie.data
        {"H": {"e": {"l": {"l": {"o": {" ": {"å�‹": {"é�”": {"": 1}}}}}}}}}

        >>> trie.add("Hello")
        >>> trie.data
        {"H": {"e": {"l": {"l": {"o": {"": 1, " ": {"å�‹": {"é�”": {"": 1}}}}}}}}}
        ```
        Nr   )r    r*   r   Ú
setdefaultr!   )r#   r,   ÚrefÚchars       r%   r*   zTrie.addJ   sc   € ñ( àà�‰×Ñ˜ÔØ�i‰iˆØò 	ˆDØŸ™ t¨RÓ0ˆC�‰IØ�d‘)‰Cð	ð '(ˆˆD×"Ñ"Ò#r'   ÚtextÚreturnc                 óh  — t        «       }dg}d}t        |«      D �]8  \  }}|r||k  rŒt        «       }d}|j                  «       D ]Ó  \  }	}
d|
v rª|j                  «       D ]q  \  }}||	kD  r ng||	k  r|dz   }|dz   }n|}|}|t	        |«      k  r||   nd}d|v r|}	|}|}||v sŒE||   }|dz  }d|v r|}	|}|}|t	        |«      k(  rŒh||   }||v rŒ-Œs |j                  |	«       |j                  «       d} n"||
v r|
|   }
|
||	<   ŒÃ|j                  |	«       ŒÕ |ri }n
|D ]  }	||	= Œ ||k\  s�Œ|| j                  v s�Œ'| j                  |   ||<   �Œ; |j                  «       D ]8  \  }	}
d|
v sŒt	        |«      }|j                  |	«       |j                  |«        n | j                  ||«      S )a\  
        Will look for the words added to the trie within `text`. Output is the original string splitted along the
        boundaries of the words found.

        This trie will match the longest possible word first !

        Example:

        ```python
        >>> trie = Trie()
        >>> trie.split("[CLS] This is a extra_id_100")
        ["[CLS] This is a extra_id_100"]

        >>> trie.add("[CLS]")
        >>> trie.add("extra_id_1")
        >>> trie.add("extra_id_100")
        >>> trie.split("[CLS] This is a extra_id_100")
        ["[CLS]", " This is a ", "extra_id_100"]
        ```
        r   Fr   r   NT)	r   Ú	enumerater   ÚitemsÚlenÚappendr*   r   Úcut_text)r#   r1   ÚstatesÚoffsetsÚskipÚcurrentÚcurrent_charÚ	to_removeÚresetÚstartÚtrie_pointerÚ	lookstartÚlooktrie_pointerÚlookahead_indexÚendÚ	next_chars                   r%   Úsplitz
Trie.spliti   sL  € ôB “ˆð
 �#ˆð
 ˆä%.¨t£_ó \	:Ñ!ˆG�\Ù˜ $šð ô ›ˆIð ˆEð (.§|¡|£~ò ?)Ñ#��|Ø˜Ñ%ð 8>·|±|³~ò  >Ñ3˜	Ð#3Ø$ uÒ,á!Ø&¨Ò.ð /6¸©k˜OØ")¨A¡+™Cð
 /6˜OØ")˜CØ=LÌsÐSWËyÒ=X D¨Ò$9Ð^b˜	ØÐ!1Ñ1Ø$-˜EØ"1˜CØ#2˜Dà'Ð+;Ò;Ø/?À	Ñ/JÐ,Ø+¨qÑ0˜OØ!Ð%5Ñ5Ø(1 Ø&5 Ø'6 à.´#°d³)Ò;à %Ø(,¨_Ñ(=˜Ið (Ð+;Ó;ð+ >ðH —N‘N 5Ô)Ø—N‘N 3Ô'Ø �EÙØ! \Ñ1ð $0°Ñ#=�Lð %1�F˜5’Mð —M‘M %Õ(ð?)ñF Ø‘à&ò &�EØ˜u™ð&ð
 ˜$Œ <°4·9±9Ó#<Ø"&§)¡)¨LÑ"9��w“ðy\	:ð~ $*§<¡<£>ò 		ÑˆE�<Ø�\Ò!ô ˜$“i�Ø—‘˜uÔ%Ø—‘˜sÔ#ñ ð		ð �}‰}˜T 7Ó+Ð+r'   c                 ó¾   — |j                  t        |«      «       g }d}|D ]9  }||kD  rt        j                  d«       Œ||k(  rŒ$|j                  ||| «       |}Œ; |S )Nr   zbThere was a bug in Trie algorithm in tokenization. Attempting to recover. Please report it anyway.)r7   r6   ÚloggerÚerror)r#   r1   r:   Útokensr@   rE   s         r%   r8   zTrie.cut_text  st   € ð 	�‰”s˜4“yÔ!ØˆØˆØò 	ˆCØ�sŠ{Ü—‘ðôð Ø˜#’ð Ø�M‰M˜$˜u S˜/Ô*Ø‰Eð	ð ˆr'   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r&   r"   Ústrr*   ÚlistrG   r8   © r'   r%   r   r   4   s=   „ ñò
òð(˜ó (ð>W,˜#ð W, $ s¡)ó W,órr'   r   c                   óJ   ‡ — e Zd Zˆ fd„Zdefd„Zdedefd„Zdedefd„Z	ˆ xZ
S )	ÚExtensionsTriec                 ó   •— t        ‰| �  |Ž  y ©N)Úsuperr&   )r#   r$   Ú	__class__s     €r%   r&   zExtensionsTrie.__init__  s   ø€ Ü‰Ñ˜$Òr'   Úprefixc                 óv   — | j                  |«      }| j                  |«      }|D �cg c]  }||z   ‘Œ	 c}S c c}w )aC  
        Generates all extensions of a given prefix token in the Trie.

        Example:

        ```python
        >>> trie = Trie()
        >>> trie.add("apple")
        >>> trie.add("app")
        >>> trie.add("application")
        >>> trie.extensions("app")
        ['app', 'apple', 'application']
        ```
        )Ú	_get_nodeÚ_collect_tokens)r#   rY   Úprefix_nodeÚretr+   s        r%   Ú
extensionszExtensionsTrie.extensions  s:   € ð —n‘n VÓ,ˆØ×"Ñ" ;Ó/ˆØ,/Ö0 5�˜“Ò0Ð0ùÒ0s   §6r+   r2   c                 óD   — | j                   }|D ]  }||vr |S ||   }Œ |S )a  
        Retrieves the node corresponding to the given token in the Trie.

        Args:
            token (str): The token for which the corresponding node needs to be retrieved.

        Returns:
            dict: The node in the Trie corresponding to the given token.
        )r   )r#   r+   Únoder0   s       r%   r[   zExtensionsTrie._get_node2  s@   € ð �y‰yˆØò 	ˆDØ˜4ÑØð ˆð ˜‘:‰Dð		ð
 ˆr'   ra   c                 ó   — | j                   |v r| j                   gng }|j                  «       D ]H  \  }}|| j                   k7  sŒ| j                  |«      }|j                  |D �cg c]  }||z   ‘Œ	 c}«       ŒJ |S c c}w )a  
        Generates all tokens in the Trie starting from a given node.

        Args:
            node (dict): The node in the Trie from which tokens need to be generated.

        Returns:
            list: List of tokens generated from the given node.
        )r!   r5   r\   Úextend)r#   ra   rK   r+   Úsubtrie_headÚ	subtokensÚsubtokens          r%   r\   zExtensionsTrie._collect_tokensD  s…   € ð .2×-CÑ-CÀtÑ-K�$×(Ñ(Ñ)ÐQSˆØ#'§:¡:£<ò 	LÑˆE�<Ø˜×.Ñ.Ó.Ø ×0Ñ0°Ó>�	Ø—‘À	ÖJ°H˜u xÓ/ÒJÕKð	Lð ˆùò Ks   Á$A;
)rL   rM   rN   r&   rP   r_   Údictr[   rQ   r\   Ú__classcell__©rX   s   @r%   rT   rT     s:   ø„ ô ð1 ó 1ð&˜sð  tó ð$ Dð ¨T÷ r'   rT   c                 ód   — | dk(  s| dk(  s
| dk(  s| dk(  ryt        j                  | «      }|dk(  ryy)z0Checks whether `char` is a whitespace character.ú ú	ú
úTÚZsF)ÚunicodedataÚcategory©r0   Úcats     r%   Ú_is_whitespacert   V  s=   € ð ˆs‚{�d˜d’l d¨d¢l°d¸d²lØÜ
×
Ñ
˜tÓ
$€CØ
ˆd‚{ØØr'   c                 ór   — | dk(  s
| dk(  s| dk(  ryt        j                  | «      }|j                  d«      ryy)z-Checks whether `char` is a control character.rl   rm   rn   FÚCT)rp   rq   Ú
startswithrr   s     r%   Ú_is_controlrx   b  s<   € ð ˆt‚|�t˜t’| t¨t¢|ØÜ
×
Ñ
˜tÓ
$€CØ
‡~�~�cÔØØr'   c                 óº   — t        | «      }|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	t        j                  | «      }|j                  d
«      ry	y)z1Checks whether `char` is a punctuation character.é!   é/   é:   é@   é[   é`   é{   é~   TÚPF)Úordrp   rq   rw   )r0   Úcprs   s      r%   Ú_is_punctuationr…   n  sj   € ä	ˆT‹€Bð
 	ˆbŠ�R˜2’X 2¨¢8°°b²¸bÀBºhÈ2ÐQSÊ8ÐY[Ð_bÒYbÐgiÐmpÒgpØÜ
×
Ñ
˜tÓ
$€CØ
‡~�~�cÔØØr'   c                 ód   — | d   }t        t        |«      t        |«      z  t        |«      z  «      S )zcChecks whether the last character in text is one of a punctuation, control or whitespace character.éÿÿÿÿ©Úboolrx   r…   rt   )r1   Ú	last_chars     r%   Ú_is_end_of_wordr‹   }  s0   € à�R‘€IÜ”˜IÓ&¬¸Ó)CÑCÄnÐU^ÓF_Ñ_Ó`Ð`r'   c                 ód   — | d   }t        t        |«      t        |«      z  t        |«      z  «      S )zdChecks whether the first character in text is one of a punctuation, control or whitespace character.r   rˆ   )r1   Ú
first_chars     r%   Ú_is_start_of_wordrŽ   ƒ  s0   € à�a‘€JÜ”˜JÓ'¬/¸*Ó*EÑEÌÐWaÓHbÑbÓcÐcr'   Ú
token_listÚ	new_tokenc                 ó‚   — t        j                  | |«      }|t        | «      k  r	| |   |k(  ry| j                  ||«       y)zm
    Inserts one token to an ordered list if it does not already exist. Note: token_list must be sorted.
    N)ÚbisectÚbisect_leftr6   Úinsert)r�   r�   Úinsertion_idxs      r%   Ú!_insert_one_token_to_ordered_listr–   ‰  sA   € ô ×&Ñ& z°9Ó=€Mà”s˜:“Ò&¨:°mÑ+DÈ	Ò+Qàà×Ñ˜-¨Õ3r'   c            '       óÄ  ‡ — e Zd ZdZˆ fd„Zedefd„«       Zedefd„«       Z	ede
eef   fd„«       Zede
eef   fd„«       Zej                  de
eeeef   f   de
eef   fd	„«       Zde
eef   fd
„Zd„ Zd„ ZdGdeee   ee   f   dedefd„Zg fdee   fd„ZdGdedefd„Zdedee   fd„Zd„ Zdeeee   f   deeee   f   fd„Zd„ Zd„ Zddej@                  e!jD                  dddddddddddddfdeee#e$f   deeee#e$f      d ed!ed"e!d#ee   d$ed%ed&ee   d'ee   d(eeee%f      d)ee   d*ee   d+ed,ed-ed.ed/ede&f&d0„Z'dej@                  e!jD                  ddddddddddddddfd1eee   ee(   ee#   ee)   ee$   ee*   f   d ed!ed"e!d#ee   d$ed%ed&ee   d'ee   d(eeee%f      d)ee   d*ee   d+ed,ed-ed.ed/ed2ede&f&d3„Z+ e,e-e.«      dej@                  e!jD                  ddddddddddddfd4eee)e/ee   df   f      d ed!ed"e!d#ee   d$ed&ee   d'ee   d(ee   d)ee   d*ee   d+ed,ed.ed/ed2ede&f"d5„«       Z0	 dGded%ede/ee
ee1f   f   fd6„Z2	 dHd7ed8ee   d9edee   fˆ fd:„Z3e4dGd;ed<edefd=„«       Z5e4dGd;ee   d<edee   fd>„«       Z5	 dGd;eeee   f   d<edeeee   f   fd?„Z5d@edefdA„Z6dee   defdB„Z7	 	 	 dIdCeeee   f   d<edDee   dEedef
dF„Z8ˆ xZ9S )JÚPreTrainedTokenizera  
    Base class for all slow tokenizers.

    Inherits from [`~tokenization_utils_base.PreTrainedTokenizerBase`].

    Handle all the shared methods for tokenization and special tokens as well as methods downloading/caching/loading
    pretrained tokenizers as well as adding tokens to the vocabulary.

    This class also contain the added tokens in a unified way on top of all tokenizers so we don't have to handle the
    specific vocabulary augmentation methods of the various underlying dictionary structures (BPE, sentencepiece...).
    c                 óÐ  •— t        «       | _        t        | d«      si | _        | j                  j	                  |j                  di «      «       | j                  j                  «       D ��ci c]  \  }}|j                  |“Œ c}}| _        t        ‰| �(  di |¤Ž | j                  | j                  D �cg c]  }|| j                  vsŒ|‘Œ c}d¬«       d| _        y c c}}w c c}w )NÚ_added_tokens_decoderÚadded_tokens_decoderT)Úspecial_tokensFrR   )r   Útokens_trieÚhasattrrš   r"   Úpopr5   ÚcontentÚ_added_tokens_encoderrW   r&   Ú_add_tokensÚall_special_tokens_extendedÚ_decode_use_source_tokenizer)r#   ÚkwargsÚvÚkr+   rX   s        €r%   r&   zPreTrainedTokenizer.__init__¤  sÖ   ø€ ô  ›6ˆÔô �tÐ4Ô5Ø@BˆDÔ&ð 	×"Ñ"×)Ñ)¨&¯*©*Ð5KÈRÓ*PÔQØOS×OiÑOi×OoÑOoÓOq×5rÁtÀqÈ!°a·i±iÀ±lÓ5rˆÔ"ô 	‰ÑÑ"˜6Ò"ð 	×ÑØ $× @Ñ @Öl�uÀEÐQU×QkÑQkÒDkŠUÒlØð 	ô 	
ð
 -2ˆÕ)ùó 6sùò ms   Á,CÂ4C#ÃC#r2   c                  ó   — y©NFrR   ©r#   s    r%   Úis_fastzPreTrainedTokenizer.is_fast½  s   € àr'   c                 ó   — t         ‚)zP
        `int`: Size of the base vocabulary (without the added tokens).
        ©ÚNotImplementedErrorrª   s    r%   Ú
vocab_sizezPreTrainedTokenizer.vocab_sizeÁ  s
   € ô
 "Ð!r'   c                 ó–   — t        | j                  j                  «       d„ ¬«      D ��ci c]  \  }}|j                  |“Œ c}}S c c}}w )zÃ
        Returns the sorted mapping from string to index. The added tokens encoder is cached for performance
        optimisation in `self._added_tokens_encoder` for the slow tokenizers.
        c                 ó   — | d   S ©Nr   rR   ©Úitems    r%   ú<lambda>z:PreTrainedTokenizer.added_tokens_encoder.<locals>.<lambda>Î  s   € ÐeiÐjkÑel€ r'   ©Úkey)Úsortedrš   r5   r    )r#   r¦   r§   s      r%   Úadded_tokens_encoderz(PreTrainedTokenizer.added_tokens_encoderÈ  s;   € ô *0°×0JÑ0J×0PÑ0PÓ0RÑXlÔ)m×n¡  A�—	‘	˜1‘ÓnÐnùÓns   ªAc                 ó`   — t        t        | j                  j                  «       d„ ¬«      «      S )z¦
        Returns the added tokens in the vocabulary as a dictionary of index to AddedToken.

        Returns:
            `Dict[str, int]`: The added tokens.
        c                 ó   — | d   S r²   rR   r³   s    r%   rµ   z:PreTrainedTokenizer.added_tokens_decoder.<locals>.<lambda>Ø  s   € ÐPTÐUVÑPW€ r'   r¶   )rg   r¸   rš   r5   rª   s    r%   r›   z(PreTrainedTokenizer.added_tokens_decoderÐ  s&   € ô ”F˜4×5Ñ5×;Ñ;Ó=ÑCWÔXÓYÐYr'   Úvaluec           
      ó   — |j                  «       D ]«  \  }}t        |t        t        f«      rt        |t        «      s>t        d|j                  |j                  f› dt        t        t        t        f   f› �«      ‚t        |t        «      rt        |«      n|| j                  |<   || j                  t        |«      <   Œ­ | j                  «        y )Nz;The provided `added_tokens_decoder` has an element of type z, should be a dict of )r5   Ú
isinstancerP   r   ÚintÚ	TypeErrorrX   r   rš   r¡   Ú_update_total_vocab_size)r#   r¼   Úindexr+   s       r%   r›   z(PreTrainedTokenizer.added_tokens_decoderÚ  sì   € ð "ŸK™K›Mò 	;‰LˆE�5Ü˜e¤c¬:Ð%6Ô7¼zÈ%ÔQTÔ?UÜØQÐRW×RaÑRaÐch×crÑcrÐRrÐQsð  tJô  KNô  PUô  V`ô  beð  Veñ  Pfð  Kfð  Jgð  hóð ô FPÐPUÔWZÔE[´
¸5Ô0AÐafˆD×&Ñ& uÑ-Ø5:ˆD×&Ñ&¤s¨5£zÒ2ð	;ð 	×%Ñ%Õ'r'   c                 ó   — | j                   S )aX  
        Returns the added tokens in the vocabulary as a dictionary of token to index. Results might be different from
        the fast call because for now we always add the tokens even if they are already in the vocabulary. This is
        something we should change.

        Returns:
            `Dict[str, int]`: The added tokens.
        )r¡   rª   s    r%   Úget_added_vocabz#PreTrainedTokenizer.get_added_vocabç  s   € ð ×)Ñ)Ð)r'   c                 ó   — | j                   S )zD
        Size of the full vocabulary with the added tokens.
        )Útotal_vocab_sizerª   s    r%   Ú__len__zPreTrainedTokenizer.__len__ò  s   € ð ×$Ñ$Ð$r'   c                 ó@   — t        | j                  «       «      | _        y)a!  
        Update the size of the full vocabulary with the added tokens. Counts the `keys` and not the `values` because
        otherwise if there is a hole in the vocab, we will add tokenizers at a wrong index. This operation is slow and
        is only updated when adding tokens.
        N)r6   Ú	get_vocabrÆ   rª   s    r%   rÁ   z,PreTrainedTokenizer._update_total_vocab_sizeø  s   € ô !$ D§N¡NÓ$4Ó 5ˆÕr'   FÚ
new_tokensrœ   c           	      ó0  — d}|€|S | j                  «       j                  «       }t        |«      }|D �]À  }t        |t        t
        f«      st        d|› dt        |«      › d�«      ‚t	        |«      dk(  rŒDt        |t        «      r3|| j                  v rŒc|| j                  v xs |}t        |dd| |¬«      }n |r|j                  d|j                  d	œ«       || j                  v rŒ¶|j                  s8|j                  r,t        | d
d«      r|j                  j!                  «       |_        |j                  |vr||z   }|||j                  <   |dz  }n||j                     }|j                  r5t	        |«      | j                  vr| j"                  d   j%                  |«       || j                  |<   || j                  |j                  <   | j&                  s�Œ¨t(        j+                  d|› d�«       �ŒÃ | j-                  «        | j/                  «        |S )a…  
        Add a list of new tokens to the tokenizer class. If the new tokens are not in the vocabulary, they are added to
        it with indices starting from length of the current vocabulary. Special tokens are sometimes already in the
        vocab which is why they have to be handled specifically.

        Args:
            new_tokens (`List[str]`or `List[tokenizers.AddedToken]`):
                Token(s) to add in vocabulary. A token is counted as added if it's not already in the vocabulary
                (tested by checking if the tokenizer assign the index of the `unk_token` to them). If a token is part
                of the vocabulary then we simply mark this token as an `AddedToken` which allows to control the
                stripping and normalization of this token. This is NOT possible in `tokenizers`.
            special_tokens (`bool`, *optional*, defaults to `False`):
                Whether or not the tokens should be added as special tokens.

        Returns:
            `int`: The number of tokens actually added to the vocabulary.

        Examples:

        ```python
        # Let's see how to increase the vocabulary of Bert model and tokenizer
        tokenizer = BertTokenizer.from_pretrained("google-bert/bert-base-uncased")
        model = BertModel.from_pretrained("google-bert/bert-base-uncased")

        num_added_toks = tokenizer.add_tokens(["new_tok1", "my_new-tok2"])
        print("We have added", num_added_toks, "tokens")
        # Note: resize_token_embeddings expects to receive the full size of the new vocabulary, i.e. the length of the tokenizer.
        model.resize_token_embeddings(len(tokenizer))
        ```r   zToken z is not a string but a ú.r   F)ÚrstripÚlstripÚ
normalizedÚspecialT)rÐ   rÏ   Údo_lower_caser   Úadditional_special_tokenszAdding z to the vocabulary)rÉ   Úcopyr6   r¾   rP   r   rÀ   Útyper¡   Úall_special_tokensÚ__setstate__rÏ   rš   rÐ   Úgetattrr    ÚlowerÚ_special_tokens_mapr7   ÚverboserI   ÚinfoÚ_update_trierÁ   )	r#   rÊ   rœ   Úadded_tokensÚcurrent_vocabÚnew_idxr+   Ú
is_specialÚtoken_indexs	            r%   r¢   zPreTrainedTokenizer._add_tokens   sþ  € ð< ˆØÐØÐàŸ™Ó(×-Ñ-Ó/ˆÜ�mÓ$ˆØó $	AˆEÜ˜e¤c¬:Ð%6Ô7Ü &¨¨Ð/FÄtÈEÃ{ÀmÐSTÐ UÓVÐVÜ�5‹z˜RÒØÜ˜%¤Ô%Ø˜D×6Ñ6Ñ6Øð "'¨$×*AÑ*AÐ!AÒ!SÀ^�JÜ&Ø e°EÈ*ÀnÐ^hô‘Eñ  ð ×"Ñ"¨tÀ5×CSÑCSÑ#TÔUØ˜×2Ñ2Ñ2ØØ—=’= U×%5Ò%5¼'À$ÈÐY^Ô:_à %§¡× 3Ñ 3Ó 5�”Ø�}‰} MÑ1Ø%¨Ñ4�Ø/:�˜eŸm™mÑ,Ø Ñ!‘à+¨E¯M©MÑ:�à�}Š}¤ U£°4×3JÑ3JÑ!JØ×(Ñ(Ð)DÑE×LÑLÈUÔSà6;ˆD×&Ñ& {Ñ3Ø8CˆD×&Ñ& u§}¡}Ñ5Ø�|Œ|Ü—‘˜g e WÐ,>Ð?Ö@ðI$	AðL 	×ÑÔØ×%Ñ%Ô'ØÐr'   Úunique_no_split_tokensc                 ó4  — | j                   j                  «       D ]@  }|| j                  j                  vsŒ| j                  j	                  |j
                  «       ŒB |D ]6  }|| j                  j                  vsŒ| j                  j	                  |«       Œ8 y rV   )rš   Úvaluesr�   r    r*   r    )r#   râ   r+   s      r%   rÜ   z PreTrainedTokenizer._update_trieN  s…   € Ø×/Ñ/×6Ñ6Ó8ò 	4ˆEØ˜D×,Ñ,×4Ñ4Ò4Ø× Ñ ×$Ñ$ U§]¡]Õ3ð	4ð ,ò 	,ˆEØ˜D×,Ñ,×4Ñ4Ò4Ø× Ñ ×$Ñ$ UÕ+ñ	,r'   Úpairc                 óX   — g }g }t        | j                  ||r
|«      «      S d«      «      S )aG  
        Returns the number of added tokens when encoding a sequence with special tokens.

        <Tip>

        This encodes a dummy input and checks the number of added tokens, and is therefore not efficient. Do not put
        this inside your training loop.

        </Tip>

        Args:
            pair (`bool`, *optional*, defaults to `False`):
                Whether the number of added tokens should be computed in the case of a sequence pair or a single
                sequence.

        Returns:
            `int`: Number of special tokens added to sequences.
        N)r6   Ú build_inputs_with_special_tokens)r#   rå   Útoken_ids_0Útoken_ids_1s       r%   Únum_special_tokens_to_addz-PreTrainedTokenizer.num_special_tokens_to_addV  s5   € ð& ˆØˆÜ�4×8Ñ8¸ÑUYÀkÓdÓeÐeÐ_cÓdÓeÐer'   r1   c                 óÐ  — |j                  d| j                  «      } | j                  |fi |¤Ž\  }}|rt        j	                  d|› d�«       t        | d«      rÊ| j                  r¾| j                  D �cg c]  }t        j                  |«      ‘Œ }}|| j                  j                  «       D �cg c]9  }|j                  s+|j                  rt        j                  |j                  «      ‘Œ; c}z  }ddj                  |«      z   dz   dz   }t        j                   |d	„ |«      }|rg }|g}n5| j"                  j%                  «       }| j&                  j)                  |«      }t+        |«      D �]*  \  }	}
|
|v sŒ| j                  j-                  | j"                  |
   d
«      }|	dkD  r||	dz
     nd
}|	t/        |«      dz
  k  r||	dz      nd
}t1        |t2        «      r¥|j4                  r|r|j7                  «       ||	dz   <   |j6                  r|r|j5                  «       ||	dz
  <   |j8                  r |r|d   dk7  r||	dz
  xx   |
z  cc<   d||	<   Œã|j8                  sŒð|sŒó|d   dk7  sŒü|
||	dz      z   ||	dz   <   d||	<   �Œt;        |› dt=        |«      › �«      ‚ g }|D ];  }
|
sŒ|
|v r|j?                  |
«       Œ|jA                  | jC                  |
«      «       Œ= |S c c}w c c}w )a$  
        Converts a string into a sequence of tokens, using the tokenizer.

        Split in words for word-based vocabulary or sub-words for sub-word-based vocabularies
        (BPE/SentencePieces/WordPieces). Takes care of added tokens.

        Args:
            text (`str`):
                The sequence to be encoded.
            **kwargs (additional keyword arguments):
                Passed along to the model-specific `prepare_for_tokenization` preprocessing method.

        Returns:
            `List[str]`: The list of tokens.
        Úsplit_special_tokenszKeyword arguments z not recognized.rÑ   ú(ú|z)|z(.+?)c                 ón   — | j                  «       d   xs! | j                  «       d   j                  «       S )Nr   r   )ÚgroupsrØ   )Úms    r%   rµ   z.PreTrainedTokenizer.tokenize.<locals>.<lambda>�  s(   € ¨Q¯X©X«Z¸©]Ò-S¸a¿h¹h»jÈ¹m×>QÑ>QÓ>S€ r'   Nr   r   r‡   rk   r   zy cannot be tokenized because it was not properly added to the tokenizer. This means that it is not an `AddedToken` but a )"rŸ   rì   Úprepare_for_tokenizationrI   Úwarningrž   rÑ   rÕ   ÚreÚescaperš   rä   rÐ   rÏ   r    ÚjoinÚsubr¡   Úkeysr�   rG   r4   Úgetr6   r¾   r   rÍ   rÎ   Úsingle_wordÚ
ValueErrorrÔ   r7   rc   Ú	_tokenize)r#   r1   r¥   rì   Ús_tokÚescaped_special_toksÚpatternÚno_split_tokenrK   Úir+   Útok_extendedÚleftÚrightÚtokenized_texts                  r%   ÚtokenizezPreTrainedTokenizer.tokenizem  sð  € ð   &Ÿz™zÐ*@À$×B[ÑB[Ó\Ðà4�t×4Ñ4°TÑD¸VÑD‰ˆˆfáÜ�N‰NÐ/°¨xÐ7GÐHÔIä�4˜Ô)¨d×.@Ò.@àCG×CZÑCZÖ#\¸¤B§I¡I¨eÕ$4Ð#\Ð Ð#\Ø à"×8Ñ8×?Ñ?ÓAö%àØ—}’}¨×)9Ò)9ô —	‘	˜%Ÿ-™-Õ(ò%ñ Ð ð
 ˜TŸY™YÐ';Ó<Ñ<¸uÑDÀxÑOˆGÜ—6‘6˜'Ñ#SÐUYÓZˆDáØˆNØ�V‰Fà!×7Ñ7×<Ñ<Ó>ˆNà×%Ñ%×+Ñ+¨DÓ1ˆFô " &Ó)ó 	‰HˆAˆuØ˜Ò&Ø#×9Ñ9×=Ñ=¸d×>XÑ>XÐY^Ñ>_ÐaeÓf�Ø()¨Aª�v˜a !™e’}°4�Ø)*¬S°«[¸1©_Ò)<˜˜q 1™ušÀ$�Ü˜l¬JÔ7Ø#×*Ò*©uð ).¯©«˜˜q 1™u™à#×*Ò*©tØ(,¯©«˜˜q 1™u™Ø#×/Ò/±D¸TÀ"¹XÈº_Ø˜q 1™u›¨Ñ.›Ø$&˜˜qš	Ø%×1Ó1²eÀÀaÁÈCÃØ(-°°q¸1±u±Ñ(=˜˜q 1™u™Ø$&˜˜q›	ä$Ø'˜.ð )^Ü^bÐcoÓ^pÐ]qðsóð ð)	ð2 ˆØò 	=ˆEáØØ˜Ñ&Ø×%Ñ% eÕ,à×%Ñ% d§n¡n°UÓ&;Õ<ð	=ð Ðùòk $]ùò%s   Á4KÂ/>K#c                 ó   — t         ‚)a  
        Converts a string into a sequence of tokens (string), using the tokenizer. Split in words for word-based
        vocabulary or sub-words for sub-word-based vocabularies (BPE/SentencePieces/WordPieces).

        Do NOT take care of added tokens.
        r­   )r#   r1   r¥   s      r%   rü   zPreTrainedTokenizer._tokenize½  s
   € ô "Ð!r'   rK   c                 ó    — |€yt        |t        «      r| j                  |«      S g }|D ]"  }|j                  | j                  |«      «       Œ$ |S )aT  
        Converts a token string (or a sequence of tokens) in a single integer id (or a sequence of ids), using the
        vocabulary.

        Args:
            tokens (`str` or `List[str]`): One or several token(s) to convert to token id(s).

        Returns:
            `int` or `List[int]`: The token id or list of token ids.
        N)r¾   rP   Ú#_convert_token_to_id_with_added_vocr7   )r#   rK   Úidsr+   s       r%   Úconvert_tokens_to_idsz)PreTrainedTokenizer.convert_tokens_to_idsÆ  sY   € ð ˆ>Øä�fœcÔ"Ø×;Ñ;¸FÓCÐCàˆØò 	HˆEØ�J‰J�t×?Ñ?ÀÓFÕGð	Hàˆ
r'   c                 ód   — |€y || j                   v r| j                   |   S | j                  |«      S rV   )r¡   Ú_convert_token_to_id©r#   r+   s     r%   r	  z7PreTrainedTokenizer._convert_token_to_id_with_added_vocÜ  s:   € Øˆ=Øà�D×.Ñ.Ñ.Ø×-Ñ-¨eÑ4Ð4Ø×(Ñ(¨Ó/Ð/r'   c                 ó   — t         ‚rV   r­   r  s     r%   r  z(PreTrainedTokenizer._convert_token_to_idä  ó   € Ü!Ð!r'   NTr   Ú	text_pairÚadd_special_tokensÚpadding_strategyÚtruncation_strategyÚ
max_lengthÚstrideÚis_split_into_wordsÚpad_to_multiple_ofÚpadding_sideÚreturn_tensorsÚreturn_token_type_idsÚreturn_attention_maskÚreturn_overflowing_tokensÚreturn_special_tokens_maskÚreturn_offsets_mappingÚreturn_lengthrÚ   c                 óÄ   ‡ ‡‡— ˆˆˆ fd„}|rt        d«      ‚ ||«      }|� ||«      nd }‰ j                  ||||j                  |j                  |||	|
|d||||||¬«      S )Nc                 ó  •— t        | t        «      r$ ‰j                  | fi ‰¤Ž}‰j                  |«      S t        | t        t
        f«      rjt        | «      dkD  r\t        | d   t        «      rI‰r6t	        t        j                  ˆˆfd„| D «       Ž «      }‰j                  |«      S ‰j                  | «      S t        | t        t
        f«      r#t        | «      dkD  rt        | d   t        «      r| S ‰rt        d| › d�«      ‚t        d| › d�«      ‚)Nr   c              3   óH   •K  — | ]  } ‰j                   |fd di‰¤Ž–— Œ y­w©r  TN©r  ©Ú.0Útr¥   r#   s     €€r%   ú	<genexpr>zJPreTrainedTokenizer._encode_plus.<locals>.get_input_ids.<locals>.<genexpr>  ó(   øè ø€ Ò)mÐcd¨-¨$¯-©-¸Ñ*^ÈtÐ*^ÐW]Õ*^Ñ)mùó   ƒ"zInput z] is not valid. Should be a string or a list/tuple of strings when `is_split_into_words=True`.zW is not valid. Should be a string, a list/tuple of strings or a list/tuple of integers.©r¾   rP   r  r  rQ   r)   r6   Ú	itertoolsÚchainr¿   rû   ©r1   rK   r  r¥   r#   s     €€€r%   Úget_input_idsz7PreTrainedTokenizer._encode_plus.<locals>.get_input_idsý  s  ø€ Ü˜$¤Ô$Ø&˜Ÿ™ tÑ6¨vÑ6�Ø×1Ñ1°&Ó9Ð9Ü˜D¤4¬ -Ô0´S¸³YÀ²]ÄzÐRVÐWXÑRYÔ[^ÔG_Ù&Ü!Ü!Ÿ™Ô)mÐhlÔ)mÐnó�Fð  ×5Ñ5°fÓ=Ð=à×5Ñ5°dÓ;Ð;Ü˜D¤4¬ -Ô0´S¸³YÀ²]ÄzÐRVÐWXÑRYÔ[^ÔG_Ø�á&Ü$Ø   ð '7ð 7óð ô
 %Ø   ð '%ð %óð r'   a  return_offset_mapping is not available when using Python tokenizers. To use this feature, change your tokenizer to one deriving from transformers.PreTrainedTokenizerFast. More information on available tokenizers at https://github.com/huggingface/transformers/pull/2674T)Úpair_idsr  ÚpaddingÚ
truncationr  r  r  r  r  Úprepend_batch_axisr  r  r  r  r   rÚ   )r®   Úprepare_for_modelr¼   )r#   r1   r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   rÚ   r¥   r0  Ú	first_idsÚ
second_idss   `       `          `   r%   Ú_encode_plusz PreTrainedTokenizer._encode_plusç  s”   ú€ ö,	ñ4 "Ü%ðHóð ñ " $Ó'ˆ	Ø1:Ð1F‘] 9Ô-ÈDˆ
à×%Ñ%ØØØ1Ø$×*Ñ*Ø*×0Ñ0Ø!ØØ1Ø%Ø)Ø#Ø"7Ø"7Ø&?Ø'AØ'Øð# &ó 
ð 	
r'   Úbatch_text_or_text_pairsrì   c                 óh  ‡ ‡‡— ˆˆˆ fd„}|rt        d«      ‚g }|D ]i  }t        |t        t        f«      s|d }}n%‰rt        |d   t        t        f«      s|d }}n|\  }} ||«      }|� ||«      nd }|j	                  ||f«       Œk ‰ j                  ||||||||	||||||
||¬«      }t        |«      S )Nc                 óô  •— t        | t        «      r$ ‰j                  | fi ‰¤Ž}‰j                  |«      S t        | t        t
        f«      rjt        | «      dkD  r\t        | d   t        «      rI‰r6t	        t        j                  ˆˆfd„| D «       Ž «      }‰j                  |«      S ‰j                  | «      S t        | t        t
        f«      r#t        | «      dkD  rt        | d   t        «      r| S t        d«      ‚)Nr   c              3   óH   •K  — | ]  } ‰j                   |fd di‰¤Ž–— Œ y­wr$  r%  r&  s     €€r%   r)  zPPreTrainedTokenizer._batch_encode_plus.<locals>.get_input_ids.<locals>.<genexpr>[  r*  r+  z\Input is not valid. Should be a string, a list/tuple of strings or a list/tuple of integers.r,  r/  s     €€€r%   r0  z=PreTrainedTokenizer._batch_encode_plus.<locals>.get_input_idsT  sÞ   ø€ Ü˜$¤Ô$Ø&˜Ÿ™ tÑ6¨vÑ6�Ø×1Ñ1°&Ó9Ð9Ü˜D¤4¬ -Ô0´S¸³YÀ²]ÄzÐRVÐWXÑRYÔ[^ÔG_Ù&Ü!Ü!Ÿ™Ô)mÐhlÔ)mÐnó�Fð  ×5Ñ5°fÓ=Ð=à×5Ñ5°dÓ;Ð;Ü˜D¤4¬ -Ô0´S¸³YÀ²]ÄzÐRVÐWXÑRYÔ[^ÔG_Ø�ä Øróð r'   zªreturn_offset_mapping is not available when using Python tokenizers. To use this feature, change your tokenizer to one deriving from transformers.PreTrainedTokenizerFast.r   )r  r  r  r  r  r  r  r  r  r  r  r   r  rÚ   rì   )r®   r¾   rQ   r)   r7   Ú_batch_prepare_for_modelr   )r#   r9  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   rÚ   rì   r¥   r0  Ú	input_idsÚids_or_pair_idsr
  r1  r6  r7  Úbatch_outputss   `      `           `        r%   Ú_batch_encode_plusz&PreTrainedTokenizer._batch_encode_plus7  sö   ú€ ö:	ñ& "Ü%ð8óð ð ˆ	Ø7ò 
	6ˆOÜ˜o´´e¨}Ô=Ø /°�X‘Ù$¬Z¸ÈÑ8JÌTÔSXÈMÔ-ZØ /°�X‘à /‘��Xá% cÓ*ˆIØ4<Ð4H™ xÔ0ÈdˆJØ×Ñ˜i¨Ð4Õ5ð
	6ð ×5Ñ5ØØ1Ø-Ø 3Ø!ØØ1Ø%Ø"7Ø"7Ø&?Ø'AØ'Ø)ØØ!5ð! 6ó 
ˆô& ˜]Ó+Ð+r'   Úbatch_ids_pairsc                 ón  — i }|D ]  \  }}| j                  |||t        j                  j                  |j                  ||ddd|
|||dd||¬«      }|j	                  «       D ]"  \  }}||vrg ||<   ||   j                  |«       Œ$ Œ� | j                  ||j                  ||||¬«      }t        ||	¬«      }|S )a�  
        Prepares a sequence of input id, or a pair of sequences of inputs ids so that it can be used by the model. It
        adds special tokens, truncates sequences if overflowing while taking into account the special tokens and
        manages a moving window (with user defined stride) for overflowing tokens

        Args:
            batch_ids_pairs: list of tokenized input ids or input ids pairs
        NF)r  r2  r3  r  r  r  r  r  r  r  r  r   r  r4  rÚ   rì   )r2  r  r  r  r  )Útensor_type)r5  r   Ú
DO_NOT_PADr¼   r5   r7   Úpadr   )r#   rB  r  r  r  r  r  r  r  r  r  r  r  r  r   rÚ   rì   r@  r6  r7  Úoutputsr·   r¼   s                          r%   r=  z,PreTrainedTokenizer._batch_prepare_for_model�  sû   € ð: ˆØ%4ò 	1Ñ!ˆI�zØ×,Ñ,ØØØ#5Ü'×2Ñ2×8Ñ8Ø.×4Ñ4Ø%ØØ#'Ø!Ø&+Ø&;Ø*CØ+EØ+Ø#Ø#(ØØ%9ð% -ó ˆGð* &Ÿm™m›oò 1‘
��UØ˜mÑ+Ø)+�M #Ñ&Ø˜cÑ"×)Ñ)¨%Õ0ñ1ð-	1ð6 Ÿ™ØØ$×*Ñ*Ø!Ø1Ø%Ø"7ð !ó 
ˆô & mÀÔPˆàÐr'   c                 ó
   — ||fS )aÏ  
        Performs any necessary transformations before tokenization.

        This method should pop the arguments from kwargs and return the remaining `kwargs` as well. We test the
        `kwargs` at the end of the encoding process to be sure all the arguments have been used.

        Args:
            text (`str`):
                The text to prepare.
            is_split_into_words (`bool`, *optional*, defaults to `False`):
                Whether or not the input is already pre-tokenized (e.g., split into words). If set to `True`, the
                tokenizer assumes the input is already split into words (for instance, by splitting it on whitespace)
                which it will tokenize. This is useful for NER or token classification.
            kwargs (`Dict[str, Any]`, *optional*):
                Keyword arguments to use for the tokenization.

        Returns:
            `Tuple[str, Dict[str, Any]]`: The prepared text and the unused kwargs.
        rR   )r#   r1   r  r¥   s       r%   rò   z,PreTrainedTokenizer.prepare_for_tokenizationÖ  s   € ð, �fˆ~Ðr'   rè   ré   Úalready_has_special_tokensc                 ó„   •— |r|�t        d«      ‚t        ‰| �	  ||d¬«      S dg|rt        |«      ndt        |«      z   z  S )aÔ  
        Retrieves 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` or `encode_plus` methods.

        Args:
            token_ids_0 (`List[int]`):
                List of ids of the first sequence.
            token_ids_1 (`List[int]`, *optional*):
                List of ids of the second sequence.
            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:
            A list of integers in the range [0, 1]: 1 for a special token, 0 for a sequence token.
        zYou should not supply a second sequence if the provided sequence of ids is already formatted with special tokens for the model.T)rè   ré   rI  r   )rû   rW   Úget_special_tokens_maskr6   )r#   rè   ré   rI  rX   s       €r%   rK  z+PreTrainedTokenizer.get_special_tokens_maskî  sd   ø€ ñ$ &ØÐ&Ü ðRóð ô
 ‘7Ñ2Ø'°[Ð]að 3ó ð ð ˆs©;”s˜;Ô'¸AÄÀ[ÓAQÑQÑRÐRr'   r
  Úskip_special_tokensc                  ó   — y rV   rR   ©r#   r
  rL  s      r%   Úconvert_ids_to_tokensz)PreTrainedTokenizer.convert_ids_to_tokens  s   € ØY\r'   c                  ó   — y rV   rR   rN  s      r%   rO  z)PreTrainedTokenizer.convert_ids_to_tokens  s   € Øehr'   c                 óŽ  — t        |t        «      r8|| j                  v r| j                  |   j                  S | j	                  |«      S g }|D ]u  }t        |«      }|r|| j
                  v rŒ|| j                  v r)|j                  | j                  |   j                  «       ŒV|j                  | j	                  |«      «       Œw |S )aì  
        Converts a single index or a sequence of indices in a token or a sequence of tokens, using the vocabulary and
        added tokens.

        Args:
            ids (`int` or `List[int]`):
                The token id (or token ids) to convert to tokens.
            skip_special_tokens (`bool`, *optional*, defaults to `False`):
                Whether or not to remove special tokens in the decoding.

        Returns:
            `str` or `List[str]`: The decoded token(s).
        )r¾   r¿   rš   r    Ú_convert_id_to_tokenÚall_special_idsr7   )r#   r
  rL  rK   rÂ   s        r%   rO  z)PreTrainedTokenizer.convert_ids_to_tokens  s¿   € ô  �cœ3ÔØ�d×0Ñ0Ñ0Ø×1Ñ1°#Ñ6×>Ñ>Ð>à×0Ñ0°Ó5Ð5ØˆØò 	@ˆEÜ˜“JˆEÙ" u°×0DÑ0DÑ'DØØ˜×2Ñ2Ñ2Ø—‘˜d×8Ñ8¸Ñ?×GÑGÕHà—‘˜d×7Ñ7¸Ó>Õ?ð	@ð ˆr'   rÂ   c                 ó   — t         ‚rV   r­   )r#   rÂ   s     r%   rR  z(PreTrainedTokenizer._convert_id_to_token2  r  r'   c                 ó$   — dj                  |«      S )Nrk   )rö   )r#   rK   s     r%   Úconvert_tokens_to_stringz,PreTrainedTokenizer.convert_tokens_to_string5  s   € Ø�x‰x˜ÓÐr'   Ú	token_idsÚclean_up_tokenization_spacesÚspaces_between_special_tokensc                 ó6  — |j                  dd«      | _        | j                  ||¬«      }t        |t        «      r|g}t        | j                  j                  «       «      t        | j                  «      z
  | j                  D �ch c]#  }| j                  |«      | j                  k\  sŒ"|’Œ% c}z  }g }	g }
|D ]n  }|r|| j                  v rŒ||v rF|
r2| j                  |
«      }t        |«      dkD  r|	j                  |«       g }
|	j                  |«       Œ^|
j                  |«       Œp |
r |	j                  | j                  |
«      «       |rdj                  |	«      }ndj                  |	«      }|�|n| j                   }|r| j#                  |«      }|S |S c c}w )NÚuse_source_tokenizerF)rL  r   rk   r   )rŸ   r¤   rO  r¾   rP   r   r¡   rø   rÕ   rÒ   r  r¯   rV  r6   r7   rö   rX  Úclean_up_tokenization)r#   rW  rL  rX  rY  r¥   Úfiltered_tokensr+   Úlegacy_added_tokensÚ	sub_textsÚcurrent_sub_textÚstringr1   Ú
clean_texts                 r%   Ú_decodezPreTrainedTokenizer._decode8  s«  € ð -3¯J©JÐ7MÈuÓ,UˆÔ)à×4Ñ4°YÐTgÐ4Óhˆä�o¤sÔ+Ø.Ð/ˆOä! $×"<Ñ"<×"AÑ"AÓ"CÓDÄsÈ4×KbÑKbÓGcÑcØ#×=Ñ=ög
ØÀ×A[ÑA[Ð\aÓAbÐfj×fuÑfuÓAuŠEòg
ñ 
Ðð ˆ	ØÐà$ò 	/ˆEÙ" u°×0GÑ0GÑ'GØØÐ+Ñ+Ù#Ø!×:Ñ:Ð;KÓL�FÜ˜6“{ Q’Ø!×(Ñ(¨Ô0Ø')Ð$Ø× Ñ  Õ'à ×'Ñ'¨Õ.ð	/ñ Ø×Ñ˜T×:Ñ:Ð;KÓLÔMá(Ø—8‘8˜IÓ&‰Dà—7‘7˜9Ó%ˆDð ,Ð7ñ )à×2Ñ2ð 	%ñ
 (Ø×3Ñ3°DÓ9ˆJØÐàˆKùòMg
s   Â#FÂ(F)Fr©   )FNT):rL   rM   rN   rO   r&   Úpropertyr‰   r«   r¿   r¯   rg   rP   r¹   r   r›   Úsetterr   rÄ   rÇ   rÁ   rQ   r¢   r   rÜ   rê   r   r  rü   r  r	  r  r   rE  r   ÚDO_NOT_TRUNCATEr   r   r   r   r8  r   r   r   rA  r   r	   r
   r)   r=  r   rò   rK  r   rO  rR  rV  rc  rh   ri   s   @r%   r˜   r˜   –  s9  ø„ ñ
ô2ð2 ð˜ò ó ðð ð"˜Cò "ó ð"ð ðo d¨3°¨8¡nò oó ðoð ðZ d¨3°
¨?Ñ&;ò Zó ðZð × Ñ ð
(¨$¨s°E¸*Àc¸/Ñ4JÐ/JÑ*Kð 
(ÐPTÐUXÐZdÐUdÑPeò 
(ó !ð
(ð	*  c¨3 h¡ó 	*ò%ò6ñL e¨D°©I°t¸JÑ7GÐ,GÑ&Hð LÐZ^ð LÐknó Lð\ DFñ ,°8¸C±=ó ,ñf¨dð f¸só fð.N˜Yð N°T¸#±Yó Nò`"ð¨E°#°t¸C±y°.Ñ,Að ÀeÈCÐQUÐVYÑQZÈNÑF[ó ò,0ò"ð RVØ#'Ø,;×,FÑ,FØ2D×2TÑ2TØ$(ØØ$)Ø,0Ø&*Ø;?Ø04Ø04Ø*/Ø+0Ø',Ø#Øñ'N
à�IÐ0°,Ð>Ñ?ðN
ð ˜E )Ð->ÀÐ"LÑMÑNðN
ð !ð	N
ð
 *ðN
ð 0ðN
ð ˜S‘MðN
ð ðN
ð "ðN
ð % S™MðN
ð ˜s‘mðN
ð !  s¨J Ñ!7Ñ8ðN
ð  (¨™~ðN
ð  (¨™~ðN
ð $(ðN
ð  %)ð!N
ð" !%ð#N
ð$ ð%N
ð& ð'N
ð* 
ó+N
ðt $(Ø,;×,FÑ,FØ2D×2TÑ2TØ$(ØØ$)Ø,0Ø&*Ø;?Ø04Ø04Ø*/Ø+0Ø',Ø#ØØ%*ñ5W,à"'Ø�‰OØ�ÑØÐ"Ñ#ØÐ&Ñ'Ø�ÑØÐ!Ñ"ð$ñ#
ðW,ð !ðW,ð *ðW,ð 0ðW,ð ˜S‘MðW,ð ðW,ð "ðW,ð  % S™Mð!W,ð" ˜s‘mð#W,ð$ !  s¨J Ñ!7Ñ8ð%W,ð&  (¨™~ð'W,ð(  (¨™~ð)W,ð* $(ð+W,ð, %)ð-W,ð. !%ð/W,ð0 ð1W,ð2 ð3W,ð4 #ð5W,ð8 
ó9W,ñr Ð/Ð1XÓYð $(Ø,;×,FÑ,FØ2D×2TÑ2TØ$(ØØ,0Ø&*Ø(,Ø04Ø04Ø*/Ø+0Ø#ØØ%*ñ#Cà˜eÐ$9¸5ÀÀcÁÈDÀÑ;QÐ$QÑRÑSðCð !ðCð *ð	Cð
 0ðCð ˜S‘MðCð ðCð % S™MðCð ˜s‘mðCð ! ™ðCð  (¨™~ðCð  (¨™~ðCð $(ðCð %)ðCð ðCð  ð!Cð" #ð#Cð$ 
ò%Có ZðCðL 6;ñØðØ.2ðà	ˆs�D˜˜c˜‘NÐ"Ñ	#óð2 inñSØðSØ.6°t©nðSØaeðSà	ˆc‰õSð< Ù\¨Ð\À4Ð\ÐTWÒ\ó Ø\àÙh¨¨c©ÐhÈÐhÐZ^Ð_bÑZcÒhó Øhð GLñØ˜˜d 3™i˜Ñ(ðØ?Cðà	ˆs�D˜‘Iˆ~Ñ	óð@"¨#ð "°#ó "ð ¨t°C©yð  ¸Só  ð %*Ø7;Ø.2ñ5à˜˜d 3™i˜Ñ(ð5ð "ð5ð '/¨t¡nð	5ð
 (,ð5ð 
÷5r'   r˜   )0rO   r’   r-  rô   rp   Úcollectionsr   Útypingr   r   r   r   Útokenization_utils_baser	   r
   r   r   r   r   r   r   r   r   r   r   r   Úutilsr   r   r   r   Ú
get_loggerrL   rI   ÚSPECIAL_TOKENS_MAP_FILEÚADDED_TOKENS_FILEÚTOKENIZER_CONFIG_FILEr   rT   rt   rx   r…   r‹   rŽ   rQ   rP   r–   r˜   rR   r'   r%   ú<module>ro     s×   ðñó
 Û Û 	Û Ý #ß 1Ó 1÷÷ ÷ õ ÷ LÓ Kð 
ˆ×	Ñ	˜HÓ	%€ð 4Ð Ø'Ð Ø/Ð ÷dñ dôN8�Tô 8òv	ò	òòaòdð
4°$°s±)ð 
4Èó 
4ñ Ð,Ó-ôVÐ1ó Vó .ñVr'   