Ë
    ÜÓ^j¦F  ã                   ó0  — d dl Z d dlZd dlZd dlmZ d dlmZ d dlmZ d dl	Z	ddl
mZ ddlmZ ddlmZ  ej                   e«      Zd	d
ddddœZdZ ed¬«       G d„ de«      «       Zdedeeef   de	j0                  fd„Zdeddfd„Zdedeez  fd„ZdgZy)é    N)ÚPath)Úcopyfile)ÚAnyé   )ÚPreTrainedTokenizer)Úlogging)Úrequiresz
source.spmz
target.spmz
vocab.jsonztarget_vocab.jsonztokenizer_config.json)Ú
source_spmÚ
target_spmÚvocabÚtarget_vocab_fileÚtokenizer_config_fileu   â–�)Úsentencepiece)Úbackendsc            
       ó¸  ‡ — e Zd ZdZeZddgZ	 	 	 	 	 	 	 	 	 d+deee	f   dz  ddfˆ fd„Z
d„ Zd	edefd
„Zd„ Zdefd„Zdedee   fd„Zdedefd„Zˆ fd„Zˆ fd„Z	 	 d,dededz  defˆ fd„Zdee   defd„Zd-dee   fd„Zd„ Zd„ Zedefd„«       Zd-dededz  dee   fd„Zdefd„Zd „ Z d!„ Z!defd"„Z"d#eddfd$„Z#d%„ Z$d&„ Z%	 d.d'ed(edz  d)edee   fd*„Z&ˆ xZ'S )/ÚMarianTokenizeraB  
    Construct a Marian tokenizer. Based on [SentencePiece](https://github.com/google/sentencepiece).

    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:
        source_spm (`str`):
            [SentencePiece](https://github.com/google/sentencepiece) file (generally has a .spm extension) that
            contains the vocabulary for the source language.
        target_spm (`str`):
            [SentencePiece](https://github.com/google/sentencepiece) file (generally has a .spm extension) that
            contains the vocabulary for the target language.
        source_lang (`str`, *optional*):
            A string representing the source language.
        target_lang (`str`, *optional*):
            A string representing the target language.
        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.
        eos_token (`str`, *optional*, defaults to `"</s>"`):
            The end of sequence token.
        pad_token (`str`, *optional*, defaults to `"<pad>"`):
            The token used for padding, for example when batching sequences of different lengths.
        model_max_length (`int`, *optional*, defaults to 512):
            The maximum sentence length the model accepts.
        additional_special_tokens (`list[str]`, *optional*, defaults to `["<eop>", "<eod>"]`):
            Additional special tokens used by the tokenizer.
        sp_model_kwargs (`dict`, *optional*):
            Will be passed to the `SentencePieceProcessor.__init__()` method. The [Python wrapper for
            SentencePiece](https://github.com/google/sentencepiece/tree/master/python) can be used, among other things,
            to set:

            - `enable_sampling`: Enable subword regularization.
            - `nbest_size`: Sampling parameters for unigram. Invalid for BPE-Dropout.

              - `nbest_size = {0,1}`: No sampling is performed.
              - `nbest_size > 1`: samples from the nbest_size results.
              - `nbest_size < 0`: assuming that nbest_size is infinite and samples from the all hypothesis (lattice)
                using forward-filtering-and-backward-sampling algorithm.

            - `alpha`: Smoothing parameter for unigram sampling, and dropout probability of merge operations for
              BPE-dropout.

    Examples:

    ```python
    >>> from transformers import MarianForCausalLM, MarianTokenizer

    >>> model = MarianForCausalLM.from_pretrained("Helsinki-NLP/opus-mt-en-de")
    >>> tokenizer = MarianTokenizer.from_pretrained("Helsinki-NLP/opus-mt-en-de")
    >>> src_texts = ["I am a small frog.", "Tom asked his teacher for advice."]
    >>> tgt_texts = ["Ich bin ein kleiner Frosch.", "Tom bat seinen Lehrer um Rat."]  # optional
    >>> inputs = tokenizer(src_texts, text_target=tgt_texts, return_tensors="pt", padding=True)

    >>> outputs = model(**inputs)  # should work
    ```Ú	input_idsÚattention_maskNÚsp_model_kwargsÚreturnc                 óÎ  •— |€i n|| _         t        |«      j                  «       s
J d|› �«       ‚|| _        t	        |«      | _        t        |«      | j
                  vrt        d«      ‚|rKt	        |«      | _        | j                  j                  «       D ��ci c]  \  }}||“Œ
 c}}| _
        g | _        nv| j
                  j                  «       D ��ci c]  \  }}||“Œ
 c}}| _
        | j
                  D �cg c](  }|j                  d«      sŒ|j                  d«      sŒ'|‘Œ* c}| _        || _        || _        ||g| _        t#        || j                   «      | _        t#        || j                   «      | _        | j$                  | _        | j
                  | _        | j-                  «        d| _        t1        ‰| �d  d|||||	|
| j                   ||dœ	|¤Ž y c c}}w c c}}w c c}w )Nzcannot find spm source z <unk> token must be in the vocabú>>ú<<F)	Úsource_langÚtarget_langÚ	unk_tokenÚ	eos_tokenÚ	pad_tokenÚmodel_max_lengthr   r   Úseparate_vocabs© )r   r   Úexistsr    Ú	load_jsonÚencoderÚstrÚKeyErrorÚtarget_encoderÚitemsÚdecoderÚsupported_language_codesÚ
startswithÚendswithr   r   Ú	spm_filesÚload_spmÚ
spm_sourceÚ
spm_targetÚcurrent_spmÚcurrent_encoderÚ_setup_normalizerÚ_decode_use_source_tokenizerÚsuperÚ__init__)Úselfr
   r   r   r   r   r   r   r   r   r   r   r    ÚkwargsÚkÚvÚ	__class__s                   €úy/var/www/ramen.bs-engineer-server.com/venv/lib/python3.12/site-packages/transformers/models/marian/tokenization_marian.pyr6   zMarianTokenizer.__init__k   sÃ  ø€ ð  &5Ð%<™rÀ/ˆÔä�JÓ×&Ñ&Ô(ÐPÐ,CÀJÀ<Ð*PÓPÐ(à.ˆÔÜ  Ó'ˆŒÜˆy‹> §¡Ñ-ÜÐ=Ó>Ð>áÜ"+Ð,=Ó">ˆDÔØ-1×-@Ñ-@×-FÑ-FÓ-H×I¡T Q¨˜A˜q™DÓIˆDŒLØ,.ˆDÕ)à-1¯\©\×-?Ñ-?Ó-A×B¡T Q¨˜A˜q™DÓBˆDŒLØ>B¿l¹lÖ2v¸ÈaÏlÉlÐ[_ÕN`Ðef×eoÑeoÐptÕeu²1Ò2vˆDÔ)à&ˆÔØ&ˆÔØ$ jÐ1ˆŒô # :¨t×/CÑ/CÓDˆŒÜ" :¨t×/CÑ/CÓDˆŒØŸ?™?ˆÔØ#Ÿ|™|ˆÔð 	×ÑÔ à,1ˆÔ)ä‰Ñð 	
à#Ø#ØØØØ-Ø ×0Ñ0Ø/Ø+ñ	
ð ó	
ùó- Jùó CùÚ2vs   ÂGÃGÃ7G"ÄG"Ä G"c                 ó¸   — 	 ddl m}  || j                  «      j                  | _        y # t
        t        f$ r  t        j                  d«       d„ | _        Y y w xY w)Nr   )ÚMosesPunctNormalizerz$Recommended: pip install sacremoses.c                 ó   — | S ©Nr!   )Úxs    r<   ú<lambda>z3MarianTokenizer._setup_normalizer.<locals>.<lambda>±   s   € ¨Q€ ó    )	Ú
sacremosesr>   r   Ú	normalizeÚpunc_normalizerÚImportErrorÚFileNotFoundErrorÚwarningsÚwarn)r7   r>   s     r<   r3   z!MarianTokenizer._setup_normalizerª   sM   € ð	/Ý7á#7¸×8HÑ8HÓ#I×#SÑ#SˆDÕ øÜÔ.Ð/ò 	/Ü�M‰MÐ@ÔAÙ#.ˆDÖ ð	/ús   ‚'* ª,AÁArA   c                 ó,   — |r| j                  |«      S dS )zHCover moses empty string edge case. They return empty list for '' input!Ú )rF   )r7   rA   s     r<   rE   zMarianTokenizer.normalize³   s   € á*+ˆt×#Ñ# AÓ&Ð3°Ð3rC   c                 ón   — || j                   v r| j                   |   S | j                   | j                     S r@   )r2   r   )r7   Útokens     r<   Ú_convert_token_to_idz$MarianTokenizer._convert_token_to_id·   s8   € Ø�D×(Ñ(Ñ(Ø×'Ñ'¨Ñ.Ð.ð ×#Ñ# D§N¡NÑ3Ð3rC   Útextc                 óš   — g }|j                  d«      r5|j                  d«      x}dk7  r|j                  |d|dz    «       ||dz   d }||fS )z6Remove language codes like >>fr<< before sentencepiecer   r   éÿÿÿÿNé   )r+   ÚfindÚappend)r7   rP   ÚcodeÚend_locs       r<   Úremove_language_codez$MarianTokenizer.remove_language_code¾   sX   € àˆØ�?‰?˜4Ô °·±¸4³Ð&@ gÀRÒ%GØ�K‰K˜˜]˜w¨™{Ð+Ô,Ø˜ !™˜Ð&ˆDØ�TˆzÐrC   c                 óv   — | j                  |«      \  }}| j                  j                  |t        ¬«      }||z   S )N)Úout_type)rX   r1   Úencoder%   )r7   rP   rV   Úpiecess       r<   Ú	_tokenizezMarianTokenizer._tokenizeÆ   s;   € Ø×.Ñ.¨tÓ4‰
ˆˆdØ×!Ñ!×(Ñ(¨¼Ð(Ó<ˆØ�f‰}ÐrC   Úindexc                 óÆ   — || j                   v r| j                   |   S | j                  r| j                  n| j                  }|j	                  |«      }|r|S | j
                  S )z?Converts an index (integer) in a token (str) using the decoder.)r)   r4   r/   r0   Ú	IdToPiecer   )r7   r^   Ú	spm_modelÚpieces       r<   Ú_convert_id_to_tokenz$MarianTokenizer._convert_id_to_tokenË   sU   € à�D—L‘LÑ Ø—<‘< Ñ&Ð&à'+×'HÒ'H�D—O’OÈdÏoÉoˆ	Ø×#Ñ# EÓ*ˆÙˆuÐ1 4§>¡>Ð1rC   c                 ó$   •— t        ‰| �  |fi |¤ŽS )ad  
        Convert a list of lists of token ids into a list of strings by calling decode.

        Args:
            sequences (`Union[list[int], list[list[int]], np.ndarray, torch.Tensor]`):
                List of tokenized input ids. Can be obtained using the `__call__` method.
            skip_special_tokens (`bool`, *optional*, defaults to `False`):
                Whether or not to remove special tokens in the decoding.
            clean_up_tokenization_spaces (`bool`, *optional*):
                Whether or not to clean up the tokenization spaces. If `None`, will default to
                `self.clean_up_tokenization_spaces` (available in the `tokenizer_config`).
            use_source_tokenizer (`bool`, *optional*, defaults to `False`):
                Whether or not to use the source tokenizer to decode sequences (only applicable in sequence-to-sequence
                problems).
            kwargs (additional keyword arguments, *optional*):
                Will be passed to the underlying model specific decode method.

        Returns:
            `list[str]`: The list of decoded sentences.
        )r5   Úbatch_decode)r7   Ú	sequencesr8   r;   s      €r<   re   zMarianTokenizer.batch_decodeÔ   s   ø€ ô* ‰wÑ# IÑ8°Ñ8Ð8rC   c                 ó$   •— t        ‰| �  |fi |¤ŽS )a÷  
        Converts a sequence of ids in a string, using the tokenizer and vocabulary with options to remove special
        tokens and clean up tokenization spaces.

        Similar to doing `self.convert_tokens_to_string(self.convert_ids_to_tokens(token_ids))`.

        Args:
            token_ids (`Union[int, list[int], np.ndarray, torch.Tensor]`):
                List of tokenized input ids. Can be obtained using the `__call__` method.
            skip_special_tokens (`bool`, *optional*, defaults to `False`):
                Whether or not to remove special tokens in the decoding.
            clean_up_tokenization_spaces (`bool`, *optional*):
                Whether or not to clean up the tokenization spaces. If `None`, will default to
                `self.clean_up_tokenization_spaces` (available in the `tokenizer_config`).
            use_source_tokenizer (`bool`, *optional*, defaults to `False`):
                Whether or not to use the source tokenizer to decode sequences (only applicable in sequence-to-sequence
                problems).
            kwargs (additional keyword arguments, *optional*):
                Will be passed to the underlying model specific decode method.

        Returns:
            `str`: The decoded sentence.
        )r5   Údecode)r7   Ú	token_idsr8   r;   s      €r<   rh   zMarianTokenizer.decodeë   s   ø€ ô0 ‰w‰~˜iÑ2¨6Ñ2Ð2rC   Úskip_special_tokensÚclean_up_tokenization_spacesc                 ór   •— | j                    }|j                  d|«      | _        t        ‰| �  d|||dœ|¤ŽS )zCInternal decode method that handles use_source_tokenizer parameter.Úuse_source_tokenizer)ri   rj   rk   r!   )r    Úpopr4   r5   Ú_decode)r7   ri   rj   rk   r8   Údefault_use_sourcer;   s         €r<   ro   zMarianTokenizer._decode  sR   ø€ ð "&×!5Ñ!5Ð5ÐØ,2¯J©JÐ7MÐOaÓ,bˆÔ)Ü‰w‰ð 
ØØ 3Ø)Eñ
ð ñ	
ð 	
rC   Útokensc                 óL  — | j                   r| j                  n| j                  }g }d}|D ]>  }|| j                  v r||j	                  |«      |z   dz   z  }g }Œ.|j                  |«       Œ@ ||j	                  |«      z  }|j                  t        d«      }|j                  «       S )zQUses source spm if _decode_use_source_tokenizer is True, and target spm otherwiserL   ú )	r4   r/   r0   Úall_special_tokensÚdecode_piecesrU   ÚreplaceÚSPIECE_UNDERLINEÚstrip)r7   rq   Úsp_modelÚcurrent_sub_tokensÚ
out_stringrN   s         r<   Úconvert_tokens_to_stringz(MarianTokenizer.convert_tokens_to_string  s°   € à&*×&GÒ&G�4—?’?ÈTÏ_É_ˆØÐØˆ
Øò 	1ˆEà˜×/Ñ/Ñ/Ø˜h×4Ñ4Ð5GÓHÈ5ÑPÐSVÑVÑV�
Ø%'Ñ"à"×)Ñ)¨%Õ0ð	1ð 	�h×,Ñ,Ð-?Ó@Ñ@ˆ
Ø×'Ñ'Ô(8¸#Ó>ˆ
Ø×ÑÓ!Ð!rC   c                 óL   — |€|| j                   gz   S ||z   | j                   gz   S )z=Build model inputs from a sequence by appending eos_token_id.)Úeos_token_id)r7   Útoken_ids_0Útoken_ids_1s      r<   Ú build_inputs_with_special_tokensz0MarianTokenizer.build_inputs_with_special_tokens&  s5   € àÐØ $×"3Ñ"3Ð!4Ñ4Ð4à˜[Ñ(¨D×,=Ñ,=Ð+>Ñ>Ð>rC   c                 óH   — | j                   | _        | j                  | _        y r@   )r/   r1   r$   r2   ©r7   s    r<   Ú_switch_to_input_modez%MarianTokenizer._switch_to_input_mode-  s   € ØŸ?™?ˆÔØ#Ÿ|™|ˆÕrC   c                 ób   — | j                   | _        | j                  r| j                  | _        y y r@   )r0   r1   r    r'   r2   rƒ   s    r<   Ú_switch_to_target_modez&MarianTokenizer._switch_to_target_mode1  s*   € ØŸ?™?ˆÔØ×ÒØ#'×#6Ñ#6ˆDÕ ð  rC   c                 ó,   — t        | j                  «      S r@   )Úlenr$   rƒ   s    r<   Ú
vocab_sizezMarianTokenizer.vocab_size6  s   € ä�4—<‘<Ó Ð rC   Úsave_directoryÚfilename_prefixc                 óz  — t         j                  j                  |«      st        j	                  d|› d�«       y g }| j
                  r±t         j                  j                  ||r|dz   ndt        d   z   «      }t         j                  j                  ||r|dz   ndt        d   z   «      }t        | j                  |«       t        | j                  |«       |j                  |«       |j                  |«       nXt         j                  j                  ||r|dz   ndt        d   z   «      }t        | j                  |«       |j                  |«       t        t        d   t        d   g| j                  | j                  | j                  g«      D �]  \  }}}	t         j                  j                  ||r|dz   nd|z   «      }
t         j                  j!                  |«      t         j                  j!                  |
«      k7  r=t         j                  j#                  |«      rt%        ||
«       |j                  |
«       Œ®t         j                  j#                  |«      rŒÎt'        |
d	«      5 }|	j)                  «       }|j+                  |«       d d d «       |j                  |
«       �Œ t-        |«      S # 1 sw Y   Œ(xY w)
NzVocabulary path (z) should be a directoryú-rL   r   r   r
   r   Úwb)ÚosÚpathÚisdirÚloggerÚerrorr    ÚjoinÚVOCAB_FILES_NAMESÚ	save_jsonr$   r'   rU   Úzipr-   r/   r0   ÚabspathÚisfiler   ÚopenÚserialized_model_protoÚwriteÚtuple)r7   rŠ   r‹   Úsaved_filesÚout_src_vocab_fileÚout_tgt_vocab_fileÚout_vocab_fileÚspm_save_filenameÚspm_orig_pathra   Úspm_save_pathÚfiÚcontent_spiece_models                r<   Úsave_vocabularyzMarianTokenizer.save_vocabulary:  sL  € Ü�w‰w�}‰}˜^Ô,Ü�L‰LÐ,¨^Ð,<Ð<SÐTÔUØØˆà×ÒÜ!#§¡§¡ØÙ*9� 3Ò&¸rÔEVÐW^ÑE_Ñ_ó"Ðô "$§¡§¡ØÙ*9� 3Ò&¸rÔEVÐWjÑEkÑkó"Ðô �d—l‘lÐ$6Ô7Ü�d×)Ñ)Ð+=Ô>Ø×ÑÐ1Ô2Ø×ÑÐ1Õ2äŸW™WŸ\™\Ø¹/ °3Ò!6ÈrÔUfÐgnÑUoÑ oóˆNô �d—l‘l NÔ3Ø×Ñ˜~Ô.ä;>Ü˜|Ñ,Ô.?ÀÑ.MÐNØ�N‰NØ�_‰_˜dŸo™oÐ.ó<
ó 	2Ñ7Ð˜}¨iô
 ŸG™GŸL™LØ¹/ °3Ò!6ÈrÐUfÑ fóˆMô �w‰w�‰˜}Ó-´·±·±ÀÓ1OÒOÔTV×T[ÑT[×TbÑTbÐcpÔTqÜ˜¨Ô6Ø×"Ñ" =Õ1Ü—W‘W—^‘^ MÕ2Ü˜-¨Ó.ð 3°"Ø+4×+KÑ+KÓ+MÐ(Ø—H‘HÐ1Ô2÷3ð ×"Ñ" =Ö1ð	2ô" �[Ó!Ð!÷3ð 3ús   É("J1Ê1J:	c                 ó"   — | j                  «       S r@   )Úget_src_vocabrƒ   s    r<   Ú	get_vocabzMarianTokenizer.get_vocabg  s   € Ø×!Ñ!Ó#Ð#rC   c                 óB   — t        | j                  fi | j                  ¤ŽS r@   )Údictr$   Úadded_tokens_encoderrƒ   s    r<   r©   zMarianTokenizer.get_src_vocabj  s   € Ü�D—L‘LÑ> D×$=Ñ$=Ñ>Ð>rC   c                 óB   — t        | j                  fi | j                  ¤ŽS r@   )r¬   r'   Úadded_tokens_decoderrƒ   s    r<   Úget_tgt_vocabzMarianTokenizer.get_tgt_vocabm  s   € Ü�D×'Ñ'ÑE¨4×+DÑ+DÑEÐErC   c                 ó†   — | j                   j                  «       }|j                  t        j	                  g d¢«      «       |S )N)r/   r0   r1   rF   r   )Ú__dict__ÚcopyÚupdater¬   Úfromkeys)r7   Ústates     r<   Ú__getstate__zMarianTokenizer.__getstate__p  s4   € Ø—‘×"Ñ"Ó$ˆØ�‰Ü�M‰MÒmÓnô	
ð ˆrC   Údc                 óæ   ‡ — |‰ _         t        ‰ d«      si ‰ _        t        ‰ d«      sd‰ _        ˆ fd„‰ j                  D «       \  ‰ _        ‰ _        ‰ j
                  ‰ _        ‰ j                  «        y )Nr   r4   Fc              3   óJ   •K  — | ]  }t        |‰j                  «      –— Œ y ­wr@   )r.   r   )Ú.0Úfr7   s     €r<   ú	<genexpr>z/MarianTokenizer.__setstate__.<locals>.<genexpr>€  s   øè ø€ Ò+fÐRS¬H°Q¸×8LÑ8L×,MÑ+fùs   ƒ #)	r²   Úhasattrr   r4   r-   r/   r0   r1   r3   )r7   r¸   s   ` r<   Ú__setstate__zMarianTokenizer.__setstate__w  sd   ø€ ØˆŒô �tÐ.Ô/Ø#%ˆDÔ Ü�tÐ;Ô<Ø05ˆDÔ-ã+fÐW[×WeÑWeÔ+fÑ(ˆŒ˜œØŸ?™?ˆÔØ×ÑÕ rC   c                  ó   — y)zJust EOSé   r!   )r7   Úargsr8   s      r<   Únum_special_tokens_to_addz)MarianTokenizer.num_special_tokens_to_add„  s   € àrC   c                 ó˜   — t        | j                  «      }|j                  | j                  «       |D �cg c]
  }||v rdnd‘Œ c}S c c}w )NrÁ   r   )ÚsetÚall_special_idsÚremoveÚunk_token_id)r7   ÚseqrÆ   rA   s       r<   Ú_special_token_maskz#MarianTokenizer._special_token_maskˆ  sF   € Ü˜d×2Ñ2Ó3ˆØ×Ñ˜t×0Ñ0Ô1Ø:=Ö>°Q�Q˜/Ñ)‘¨qÑ0Ò>Ð>ùÒ>s   µAr   r€   Úalready_has_special_tokensc                 ó†   — |r| j                  |«      S |€| j                  |«      dgz   S | j                  ||z   «      dgz   S )zCGet list where entries are [1] if a token is [eos] or [pad] else 0.rÁ   )rÊ   )r7   r   r€   rË   s       r<   Úget_special_tokens_maskz'MarianTokenizer.get_special_tokens_mask�  sS   € ñ &Ø×+Ñ+¨KÓ8Ð8ØÐ Ø×+Ñ+¨KÓ8¸A¸3Ñ>Ð>à×+Ñ+¨K¸+Ñ,EÓFÈ!ÈÑLÐLrC   )	NNNz<unk>z</s>z<pad>i   NF)FNr@   )NF)(Ú__name__Ú
__module__Ú__qualname__Ú__doc__r•   Úvocab_files_namesÚmodel_input_namesr¬   r%   r   r6   r3   rE   rO   rX   Úlistr]   Úintrc   re   rh   Úboolro   r|   r�   r„   r†   Úpropertyr‰   r�   r§   rª   r©   r°   r·   r¿   rÃ   rÊ   rÍ   Ú__classcell__)r;   s   @r<   r   r   ,   sÛ  ø„ ñ8ðt *ÐØ$Ð&6Ð7Ðð ØØØØØØØ15Øñ=
ð ˜c 3˜h™¨$Ñ.ð=
ð 
õ=
ò~/ð4˜3ð 4 3ó 4ò4ð¨ó ð˜cð  d¨3¡ió ð
2¨#ð 2°#ó 2ô9ô.3ð: %*Ø48ñ	
ð "ð
ð '+¨T¡kð	
ð 
õ
ð""¨t°C©yð "¸Só "ñ ?ÐQUÐVYÑQZó ?ò,ò7ð
 ð!˜Cò !ó ð!ñ+"¨cð +"ÀCÈ$ÁJð +"ÐZ_Ð`cÑZdó +"ðZ$˜4ó $ò?òFð˜dó ð!˜dð ! tó !òò?ð fkñ	MØð	MØ.2°T©kð	MØ^bð	Mà	ˆc‰÷	MrC   r   r�   r   r   c                 óR   — t        j                  di |¤Ž}|j                  | «       |S )Nr!   )r   ÚSentencePieceProcessorÚLoad)r�   r   Úspms      r<   r.   r.   ™  s%   € Ü
×
.Ñ
.Ñ
A°Ñ
A€CØ‡H�HˆT„NØ€JrC   c                 óv   — t        |d«      5 }t        j                  | |d¬«       d d d «       y # 1 sw Y   y xY w)NÚwrS   )Úindent)rš   ÚjsonÚdump)Údatar�   r¼   s      r<   r–   r–   Ÿ  s2   € Ü	ˆd�C‹ð %˜AÜ�	‰	�$˜ !Õ$÷%÷ %ñ %ús   �/¯8c                 óp   — t        | d«      5 }t        j                  |«      cd d d «       S # 1 sw Y   y xY w)NÚr)rš   rà   Úload)r�   r¼   s     r<   r#   r#   ¤  s-   € Ü	ˆd�C‹ð ˜AÜ�y‰y˜‹|÷÷ ò ús   �,¬5)rà   r�   rI   Úpathlibr   Úshutilr   Útypingr   r   Útokenization_pythonr   Úutilsr   Úutils.import_utilsr	   Ú
get_loggerrÎ   r’   r•   rw   r   r%   r¬   rÚ   r.   r–   rÔ   r#   Ú__all__r!   rC   r<   ú<module>rî      sß   ðó Û 	Û Ý Ý Ý ã å 6Ý Ý *ð 
ˆ×	Ñ	˜HÓ	%€ð ØØØ,Ø4ñÐ ð Ð ñ
 
Ð%Ô&ôiMÐ)ó iMó 'ðiMðX�3ð ¨¨c°3¨h©ð ¸M×<`Ñ<`ó ð%˜#ð % $ó %ð
�Cð ˜D 4™Kó ð
 Ð
�rC   