§
    ãóÉjgS  ã            )       ór  — d dl Z d dlZd dlZd dlZd dlZd dlmZmZmZm	Z	m
Z
mZ d dlmZmZmZmZmZmZ d„ Z	 	 	 d9dedee	e                  d	e
ee	e                           d
ededee         fd„Z	 	 d:dedee	e                  dee	e                  d
ededee         fd„Z	 	 d;dedee	e                  d
ededee         f
d„Z	 	 d:dedee	e                  d
ededee         f
d„Z	 d<dddddddd ddddddœdede	e         d	e
e	e                  dededededed ed!ed"ed#ed$e
e	e	e                           d%e
eee	e         e	e         f                  d&ed'edee         f"d(„Z	 	 d=d)d dddddd ddddd*dd+œded,ee	e         e	e	e                  f         d
eded-ed.edededed ed!ed"ed#ed$e
e	e	e                           d%e
eee	e         e	e         f                  d/e
e	e                  d0ed1eegef         dee         f&d2„Z	 	 d=d)d dddddd ddddd*dd+œded,ee	e         e	e	e                  f         d
eded-ed.edededed ed!ed"ed#ed$e
e	e	e                           d%e
eee	e         e	e         f                  d/e
e	e                  d0ed1eegef         dee         f&d3„Z G d4„ d5¦  «        Zd6„ Z d7„ Z!d8„ Z"dS )>é    N)ÚAsyncIterableÚCallableÚIterableÚListÚOptionalÚUnion)ÚGenerationResultÚGenerationStepResultÚ	GeneratorÚScoringResultÚTranslationResultÚ
Translatorc                  ó€  — t          t          dt          ¦  «         t          t          dt          ¦  «         t          t          dt          ¦  «         t          t
          dt          ¦  «         t          t
          dt          ¦  «         t          t
          dt          ¦  «         t          t
          dt          ¦  «         dS )z4Registers additional attributes to compiled modules.Útranslate_iterableÚscore_iterableÚgenerate_tokensÚgenerate_iterableÚasync_generate_tokensN)
Úsetattrr   Útranslator_translate_iterableÚtranslator_score_iterableÚtranslator_generate_tokensr   Úgenerator_generate_iterableÚgenerator_score_iterableÚgenerator_generate_tokensÚgenerator_async_generate_tokens© ó    ú{/home/lighthouse/badge-speaker-benchmark/.benchmark-venv-community/lib64/python3.11/site-packages/ctranslate2/extensions.pyÚregister_extensionsr       s”   € å�JÐ,Õ.KÑLÔLÐLÝ�JÐ(Õ*CÑDÔDÐDÝ�JÐ)Õ+EÑFÔFÐFÝ�IÐ*Õ,GÑHÔHÐHÝ�IÐ'Õ)AÑBÔBÐBÝ�IÐ(Õ*CÑDÔDÐDÝ�IÐ.Õ0OÑPÔPÐPÐPÐPr   é    ÚexamplesÚ
translatorÚsourceÚtarget_prefixÚmax_batch_sizeÚ
batch_typeÚreturnc              +   ót   K  — |g}|�|                      |¦  «         t          | j        |||fi |¤ŽE d{V —† dS )a6  Translates an iterable of tokenized examples.

    This method is built on top of :meth:`ctranslate2.Translator.translate_batch`
    to efficiently translate an arbitrarily large stream of data. It enables the
    following optimizations:

    * stream processing (the iterable is not fully materialized in memory)
    * parallel translations (if the translator has multiple workers)
    * asynchronous batch prefetching
    * local sorting by length

    Arguments:
      source: An iterable of tokenized source examples.
      target_prefix: An optional iterable of tokenized target prefixes.
      max_batch_size: The maximum batch size.
      batch_type: Whether :obj:`max_batch_size` is the number of "examples" or "tokens".
      **kwargs: Any translation options accepted by
        :meth:`ctranslate2.Translator.translate_batch`.

    Returns:
      A generator iterator over :class:`ctranslate2.TranslationResult` instances.

    Example:
      This method can be used to efficiently translate text files:

      .. code-block:: python

          # Replace by your own tokenization and detokenization functions.
          tokenize_fn = lambda line: line.strip().split()
          detokenize_fn = lambda tokens: " ".join(tokens)

          with open("input.txt") as input_file:
              source = map(tokenize_fn, input_file)
              results = translator.translate_iterable(source, max_batch_size=64)

              for result in results:
                  tokens = result.hypotheses[0]
                  target = detokenize_fn(tokens)
                  print(target)
    N)ÚappendÚ_process_iterableÚtranslate_batch)r#   r$   r%   r&   r'   ÚkwargsÚ	iterabless          r   r   r      s‚   è è € ð` �€IØÐ Ø×Ò˜Ñ'Ô'Ð'å ØÔ"ØØØð	ð ð
 ðð ð ð ð ð ð ð ð ð ð r   é@   Útargetc              +   óD   K  — t          | j        ||g||fi |¤ŽE d{V —† dS )a}  Scores an iterable of tokenized examples.

    This method is built on top of :meth:`ctranslate2.Translator.score_batch`
    to efficiently score an arbitrarily large stream of data. It enables the
    following optimizations:

    * stream processing (the iterable is not fully materialized in memory)
    * parallel scoring (if the translator has multiple workers)
    * asynchronous batch prefetching
    * local sorting by length

    Arguments:
      source: An iterable of tokenized source examples.
      target: An iterable of tokenized target examples.
      max_batch_size: The maximum batch size.
      batch_type: Whether :obj:`max_batch_size` is the number of "examples" or "tokens".
      **kwargs: Any scoring options accepted by
        :meth:`ctranslate2.Translator.score_batch`.

    Returns:
      A generator iterator over :class:`ctranslate2.ScoringResult` instances.
    N©r+   Úscore_batch)r#   r$   r0   r&   r'   r-   s         r   r   r   [   se   è è € õ< !ØÔØ	�ÐØØð	ð ð
 ðð ð ð ð ð ð ð ð ð ð r   Ú	generatorÚstart_tokensc              +   óB   K  — t          | j        |g||fi |¤ŽE d{V —† dS )ac  Generates from an iterable of tokenized prompts.

    This method is built on top of :meth:`ctranslate2.Generator.generate_batch`
    to efficiently run generation on an arbitrarily large stream of data. It enables
    the following optimizations:

    * stream processing (the iterable is not fully materialized in memory)
    * parallel generations (if the generator has multiple workers)
    * asynchronous batch prefetching
    * local sorting by length

    Arguments:
      start_tokens: An iterable of tokenized prompts.
      max_batch_size: The maximum batch size.
      batch_type: Whether :obj:`max_batch_size` is the number of "examples" or "tokens".
      **kwargs: Any generation options accepted by
        :meth:`ctranslate2.Generator.generate_batch`.

    Returns:
      A generator iterator over :class:`ctranslate2.GenerationResult` instances.
    N)r+   Úgenerate_batch)r4   r5   r&   r'   r-   s        r   r   r   ‚   sb   è è € õ8 !ØÔ Ø	ˆØØð	ð ð
 ðð ð ð ð ð ð ð ð ð ð r   Útokensc              +   óB   K  — t          | j        |g||fi |¤ŽE d{V —† dS )a9  Scores an iterable of tokenized examples.

    This method is built on top of :meth:`ctranslate2.Generator.score_batch`
    to efficiently score an arbitrarily large stream of data. It enables
    the following optimizations:

    * stream processing (the iterable is not fully materialized in memory)
    * parallel scoring (if the generator has multiple workers)
    * asynchronous batch prefetching
    * local sorting by length

    Arguments:
      tokens: An iterable of tokenized examples.
      max_batch_size: The maximum batch size.
      batch_type: Whether :obj:`max_batch_size` is the number of "examples" or "tokens".
      **kwargs: Any score options accepted by
        :meth:`ctranslate2.Generator.score_batch`.

    Returns:
      A generator iterator over :class:`ctranslate2.ScoringResult` instances.
    Nr2   )r4   r8   r&   r'   r-   s        r   r   r   §   sb   è è € õ8 !ØÔØ	ˆØØð	ð ð
 ðð ð ð ð ð ð ð ð ð ð r   é   é   Fi   )Úmax_decoding_lengthÚmin_decoding_lengthÚsampling_topkÚsampling_toppÚsampling_temperatureÚreturn_log_probÚrepetition_penaltyÚno_repeat_ngram_sizeÚdisable_unkÚsuppress_sequencesÚ	end_tokenÚmax_input_lengthÚuse_vmapr<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   c             #   ój   K  — t          | j        |g|�|gnd|	|
|||||||||||¬¦  «        E d{V —† dS )a{  Yields tokens as they are generated by the model.

    Arguments:
      source: Source tokens.
      target_prefix: Optional target prefix tokens.
      max_decoding_length: Maximum prediction length.
      min_decoding_length: Minimum prediction length.
      sampling_topk: Randomly sample predictions from the top K candidates.
      sampling_topp: Keep the most probable tokens whose cumulative probability exceeds this value.
      sampling_temperature: Sampling temperature to generate more random samples.
      return_log_prob: Include the token log probability in the result.
      repetition_penalty: Penalty applied to the score of previously generated tokens
        (set > 1 to penalize).
      no_repeat_ngram_size: Prevent repetitions of ngrams with this size
        (set 0 to disable).
      disable_unk: Disable the generation of the unknown token.
      suppress_sequences: Disable the generation of some sequences of tokens.
      end_token: Stop the decoding on one of these tokens (defaults to the model EOS token).
      max_input_length: Truncate inputs after this many tokens (set 0 to disable).
      use_vmap: Use the vocabulary mapping file saved in this model

    Returns:
      A generator iterator over :class:`ctranslate2.GenerationStepResult` instances.

    Note:
      This generation method is not compatible with beam search which requires a complete decoding.
    N)rB   rC   rD   rE   rF   r<   r=   r>   r?   r@   Úreturn_scoresrG   rH   )Ú_generate_tokensr,   )r#   r$   r%   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   s                   r   r   r   Ì   sˆ   è è € õ\  ØÔ"Ø	ˆØ(Ð4ˆˆˆ¸$Ø-Ø1ØØ-ØØ/Ø/Ø#Ø#Ø1Ø%Ø)Øð!ñ ô ð ð ð ð ð ð ð ð ð r   i   T)Ú
max_lengthÚ
min_lengthr>   r?   r@   rA   rB   rC   rD   rE   rF   Ústatic_promptÚcache_static_promptÚcallbackÚpromptrL   rM   rN   rO   rP   c             #   ó   K  — t          |¦  «        dk    rt          |d         t          ¦  «        r|g}t          | j        |fi d|“d|“d|
“d|“d|“d|“d|“d	|“d
|“d|“d|“d|“d|	“d|“d|“dd“d|“ŽE d{V —† dS )aÙ  Yields tokens as they are generated by the model.

    Arguments:
      prompt: Batch of start tokens. If the decoder starts from a
        special start token like <s>, this token should be added to this input.
      max_batch_size: The maximum batch size.
      batch_type: Whether :obj:`max_batch_size` is the number of "examples" or "tokens".
      max_length: Maximum generation length.
      min_length: Minimum generation length.
      sampling_topk: Randomly sample predictions from the top K candidates.
      sampling_topp: Keep the most probable tokens whose cumulative probability exceeds this value.
      sampling_temperature: Sampling temperature to generate more random samples.
      return_log_prob: Include the token log probability in the result.
      repetition_penalty: Penalty applied to the score of previously generated tokens
        (set > 1 to penalize).
      no_repeat_ngram_size: Prevent repetitions of ngrams with this size
        (set 0 to disable).
      disable_unk: Disable the generation of the unknown token.
      suppress_sequences: Disable the generation of some sequences of tokens.
      end_token: Stop the decoding on one these tokens (defaults to the model EOS token).
      static_prompt: If the model expects a static prompt (a.k.a. system prompt)
        it can be set here to simplify the inputs and optionally cache the model
        state for this prompt to accelerate future generations.
      cache_static_prompt: Cache the model state after the static prompt and
        reuse it for future generations using the same static prompt.
      callback: Optional function that is called for each generated token when
        obj:`beam_size` is 1. If the callback function returns ``True``, the
        decoding will stop for this batch index.

    Returns:
      A generator iterator over :class:`ctranslate2.GenerationStepResult` instances.

    Note:
      This generation method is not compatible with beam search which requires a complete decoding.
    r   r&   r'   rB   rC   rD   rE   rF   rL   rM   r>   r?   r@   rJ   rN   rO   Úinclude_prompt_in_resultFrP   N)ÚlenÚ
isinstanceÚstrrK   r7   )r4   rQ   r&   r'   rL   rM   r>   r?   r@   rA   rB   rC   rD   rE   rF   rN   rO   rP   s                     r   r   r     sJ  è è € õp ˆ6�{„{�Q‚€�: f¨Q¤iµÑ5Ô5€Ø�ˆÝØÔ Øðð ð ð &�~ðð �:ð	ð
 .Ð-ðð 2Ð1ðð  �Kðð .Ð-ðð �)ðð �:ðð �:ðð $�mðð $�mðð 2Ð1ðð &�oðð  $�mð!ð" 0Ð/ð#ð$ "' ð%ð& �ð'ð ð ð ð ð ð ð ð ð r   c               ó  K  — t          |¦  «        dk    rt          |d         t          ¦  «        r|g}t          | j        |fi d|“d|“d|
“d|“d|“d|“d|“d	|“d
|“d|“d|“d|“d|	“d|“d|“dd“d|“Ž2 3 d{V —†}|W V — Œ6 dS )aò  Yields tokens asynchronously as they are generated by the model.

    Arguments:
      prompt: Batch of start tokens. If the decoder starts from a
        special start token like <s>, this token should be added to this input.
      max_batch_size: The maximum batch size.
      batch_type: Whether :obj:`max_batch_size` is the number of "examples" or "tokens".
      max_length: Maximum generation length.
      min_length: Minimum generation length.
      sampling_topk: Randomly sample predictions from the top K candidates.
      sampling_topp: Keep the most probable tokens whose cumulative probability exceeds this value.
      sampling_temperature: Sampling temperature to generate more random samples.
      return_log_prob: Include the token log probability in the result.
      repetition_penalty: Penalty applied to the score of previously generated tokens
        (set > 1 to penalize).
      no_repeat_ngram_size: Prevent repetitions of ngrams with this size
        (set 0 to disable).
      disable_unk: Disable the generation of the unknown token.
      suppress_sequences: Disable the generation of some sequences of tokens.
      end_token: Stop the decoding on one of these tokens (defaults to the model EOS token).
      static_prompt: If the model expects a static prompt (a.k.a. system prompt)
        it can be set here to simplify the inputs and optionally cache the model
        state for this prompt to accelerate future generations.
      cache_static_prompt: Cache the model state after the static prompt and
        reuse it for future generations using the same static prompt.
      callback: Optional function that is called for each generated token when
        obj:`beam_size` is 1. If the callback function returns ``True``, the
        decoding will stop for this batch index.

    Returns:
      An async generator iterator over :class:`ctranslate2.GenerationStepResult` instances.

    Note:
      This generation method is not compatible with beam search which requires a complete decoding.
    r   r&   r'   rB   rC   rD   rE   rF   rL   rM   r>   r?   r@   rJ   rN   rO   rS   FrP   N)rT   rU   rV   ÚAsyncGeneratorr7   )r4   rQ   r&   r'   rL   rM   r>   r?   r@   rA   rB   rC   rD   rE   rF   rN   rO   rP   Ústep_results                      r   r   r   _  se  è è € õp ˆ6�{„{�Q‚€�: f¨Q¤iµÑ5Ô5€Ø�ˆÝ+ØÔ Øðð ð ð &�~ðð �:ð	ð
 .Ð-ðð 2Ð1ðð  �Kðð .Ð-ðð �)ðð �:ðð �:ðð $�mðð $�mðð 2Ð1ðð &�oðð  $�mð!ð" 0Ð/ð#ð$ "' ð%ð& �ð'ð ð ð ð ð ð ð ˆkð* ÐÐÐÐÐð+ð ð s   Á8Bc                   ó&   — e Zd Zd„ Zd„ Zd„ Zd„ ZdS )rX   c                 óž   — t          j        ¦   «         | _        t          j        ¦   «         | _        d | _        || _        || _        || _	        d S ©N)
ÚasyncioÚQueueÚqueueÚ	threadingÚEventÚshutdown_eventÚiterator_taskÚprocess_funcÚargsr-   )Úselfrd   re   r-   s       r   Ú__init__zAsyncGenerator.__init__²  sA   € Ý”]‘_”_ˆŒ
Ý'œoÑ/Ô/ˆÔØ!ˆÔØ(ˆÔØˆŒ	ØˆŒˆˆr   c              ƒ   ó8  K  — t          | j        g| j        ¢R i | j        ¤ŽD ]W}| j                             |¦  «        ƒ d {V —† t          j        d¦  «        ƒ d {V —† | j         	                    ¦   «         r nŒX| j                             d ¦  «        ƒ d {V —† d S )Ng-Cëâ6?)
rK   rd   re   r-   r_   Úputr]   Úsleeprb   Úis_set)rf   rY   s     r   ÚproducerzAsyncGenerator.producerº  sÚ   è è € å+ØÔð
Ø $¤	ð
ð 
ð 
Ø-1¬[ð
ð 
ð 	ð 	ˆKð ”*—.’. Ñ-Ô-Ð-Ð-Ð-Ð-Ð-Ð-Ð-Ý”- Ñ'Ô'Ð'Ð'Ð'Ð'Ð'Ð'Ð'àÔ"×)Ò)Ñ+Ô+ð Ø�ðàŒj�nŠn˜TÑ"Ô"Ð"Ð"Ð"Ð"Ð"Ð"Ð"Ð"Ð"r   c                 ó\   — t          j        |                      ¦   «         ¦  «        | _        | S r\   )r]   Úcreate_taskrl   rc   )rf   s    r   Ú	__aiter__zAsyncGenerator.__aiter__Æ  s"   € Ý$Ô0°·²±´ÑAÔAˆÔØˆr   c              ƒ   ó4  K  — | j                              ¦   «         rt          ‚	 | j                             ¦   «         ƒ d {V —†}|€ | j                              ¦   «          t          ‚|S # t          j        $ r! | j                              ¦   «          t          ‚w xY wr\   )rb   rk   ÚStopAsyncIterationr_   ÚgetÚsetr]   ÚCancelledError)rf   Úitems     r   Ú	__anext__zAsyncGenerator.__anext__Ê  s©   è è € ØÔ×%Ò%Ñ'Ô'ð 	%Ý$Ð$ð	%ØœŸšÑ)Ô)Ð)Ð)Ð)Ð)Ð)Ð)ˆDØˆ|ØÔ#×'Ò'Ñ)Ô)Ð)Ý(Ð(ØˆKøÝÔ%ð 	%ð 	%ð 	%ØÔ×#Ò#Ñ%Ô%Ð%Ý$Ð$ð	%øøøs   ¤AA' Á'0BN)Ú__name__Ú
__module__Ú__qualname__rg   rl   ro   rv   r   r   r   rX   rX   ±  sP   € € € € € ðð ð ð
#ð 
#ð 
#ðð ð ð%ð %ð %ð %ð %r   rX   c              /   ó   ‡‡‡	‡
K  — t          j        ¦   «         Š	t          j        ¦   «         Š|                     dd ¦  «        Š
‰
€d„ Š
ˆˆ	ˆ
fd„}|                     dd|dœ¦  «          | |i |¤ŽŠˆˆ	fd„}t          j        |d¬¦  «        }|                     ¦   «          	 ‰	                     ¦   «         }|€nBt          |t          ¦  «        r|‚	 |V — n$# t          $ r ‰                     ¦   «          Y nw xY wŒY|                     ¦   «          d S )	NrP   c                 ó   — dS )NFr   )rY   s    r   ú<lambda>z"_generate_tokens.<locals>.<lambda>ß  s   € ¨E€ r   c                 óp   •—  ‰| ¦  «        }‰                      | ¦  «         ‰                     ¦   «         p|S r\   )ri   rk   )rY   Úuser_callback_resultÚgenerator_closedÚstep_resultsÚuser_callbacks     €€€r   Ú	_callbackz#_generate_tokens.<locals>._callbacká  s?   ø€ Ø,˜}¨[Ñ9Ô9ÐØ×Ò˜Ñ%Ô%Ð%à×&Ò&Ñ(Ô(Ð@Ð,@Ð@r   Tr;   )ÚasynchronousÚ	beam_sizerP   c                  óÀ   •— 	 ‰D ]} |                       ¦   «          Œn,# t          $ r}‰                     |¦  «         Y d }~nd }~ww xY w‰                     d ¦  «         d S r\   )ÚresultÚ	Exceptionri   )r†   ÚeÚasync_resultsr€   s     €€r   Ú_catch_exceptionz*_generate_tokens.<locals>._catch_exceptionñ  s‡   ø€ ð	 Ø'ð  ð  �Ø—’‘”��ð øåð 	 ð 	 ð 	 Ø×Ò˜QÑÔÐÐÐÐÐÐøøøøð	 øøøà×Ò˜ÑÔÐÐÐs   ƒ �
A§AÁA)r0   Údaemon)r_   r^   r`   ra   rr   ÚupdateÚThreadÚstartrU   r‡   ÚGeneratorExitrs   Újoin)rd   re   r-   r‚   rŠ   ÚthreadrY   r‰   r   r€   r�   s          @@@@r   rK   rK   Ù  s‡  øøøøè è € Ý”;‘=”=€LÝ ”Ñ(Ô(Ðà—J’J˜z¨4Ñ0Ô0€MØÐØ1Ð1ˆðAð Að Að Að Að Að Að ‡M‚Mà ØØ!ð	
ð 	
ñô ð ð !�L $Ð1¨&Ð1Ð1€Mðð ð ð ð ð õ ÔÐ%5¸dÐCÑCÔC€FØ
‡L‚L�N„N€NðØ"×&Ò&Ñ(Ô(ˆàÐØå�k¥9Ñ-Ô-ð 	ØÐð	ØÐÐÐÐøÝð 	ð 	ð 	Ø× Ò Ñ"Ô"Ð"ØˆEð	øøøðð  ‡K‚K�M„M€M€M€Ms   ÃC ÃC6Ã5C6c              +   óV  K  — |dk     rt          d¦  «        ‚t          |¦  «        dk    r	|d         }nt          j        |Ž }|                     ||ddœ¦  «         |dk    r|dz  n|}t          j        ¦   «         }t          |||¦  «        D ]s} |j         | |i |¤Ž¦  «         |rY|d          	                    ¦   «         r? |j
        ¦   «                              ¦   «         V — |r|d          	                    ¦   «         °?Œt|r' |j
        ¦   «                              ¦   «         V — |°%d S d S )Nr;   zmax_batch_size must be >= 1r   T)r&   r'   rƒ   é   )Ú
ValueErrorrT   Ú	itertoolsÚzip_longestrŒ   ÚcollectionsÚdequeÚ_batch_iteratorÚextendÚdoneÚpopleftr†   )	rd   r.   r&   r'   r-   ÚiterableÚread_batch_sizer_   Ústreamss	            r   r+   r+     sx  è è € Ø˜ÒÐÝÐ6Ñ7Ô7Ð7å
ˆ9�~„~˜ÒÐØ˜Q”<ˆˆåÔ(¨)Ð4ˆà
‡M‚Mà,Ø$Ø ð	
ð 	
ñô ð ð .<¸aÒ-?Ð-?�n rÑ)Ð)À^€OÝÔÑÔ€Eå" 8¨_¸jÑIÔIð +ð +ˆØˆŒ�\�\ 7Ð5¨fÐ5Ð5Ñ6Ô6Ð6àð 	+˜˜aœŸš™œð 	+Ø�%”-‘/”/×(Ò(Ñ*Ô*Ð*Ð*Ð*ð ð 	+˜˜aœŸš™œð 	+øð ð 'ØˆeŒm‰oŒo×$Ò$Ñ&Ô&Ð&Ð&Ð&ð ð 'ð 'ð 'ð 'ð 'r   c              #   ót  K  — d }d}| D �]%}t          |t          ¦  «        s|f}|dk    r"|rt          |d         ¦  «        |k    r|V — d }nx|dk    r`t          |t          |d         ¦  «        ¦  «        }|r:t          |d         ¦  «        dz   |z  |k    r|V — d }t          |d         ¦  «        }nt	          d|z  ¦  «        ‚|€t          d„ |D ¦   «         ¦  «        }t          ||¦  «        D ]>\  }}|€"t          |¦  «        dk    rt	          d¦  «        ‚|                     |¦  «         Œ?�Œ'|�|V — d S d S )Nr   r"   r8   r;   zInvalid batch type %sc              3   ó   K  — | ]}g V — Œd S r\   r   )Ú.0Ú_s     r   ú	<genexpr>z"_batch_iterator.<locals>.<genexpr>F  s"   è è € Ð0Ð0 1˜BÐ0Ð0Ð0Ð0Ð0Ð0r   z+Input iterables do not have the same length)rU   ÚtuplerT   Úmaxr”   Úzipr*   )r�   Ú
batch_sizer'   rŸ   rL   ÚexampleÚbatchÚelements           r   r™   r™   -  s…  è è € Ø€GØ€Jàð "ñ "ˆÝ˜'¥5Ñ)Ô)ð 	!Ø�jˆGà˜Ò#Ð#Øð �3˜w qœz™?œ?¨jÒ8Ð8Ø���Ø�øà˜8Ò#Ð#Ý˜Z­¨W°Q¬Z©¬Ñ9Ô9ˆJàð -�C ¨¤
™OœO¨aÑ/°:Ñ=À
ÒJÐJØ���Ø�Ý  ¨¤™_œ_�
øõ Ð4°zÑAÑBÔBÐBàˆ?ÝÐ0Ð0¨Ð0Ñ0Ô0Ñ0Ô0ˆGÝ! '¨7Ñ3Ô3ð 	"ð 	"‰NˆE�7Øˆ¥3 w¡<¤<°!Ò#3Ð#3Ý Ð!NÑOÔOÐOØ�LŠL˜Ñ!Ô!Ð!Ð!ñ	"ð
 ÐØˆˆˆˆˆð Ðr   )Nr!   r"   )r/   r"   )r!   r"   r\   )r   r"   )#r]   r—   r•   r_   r`   Útypingr   r   r   r   r   r   Úctranslate2._extr	   r
   r   r   r   r   r    rV   Úintr   r   r   r   ÚfloatÚboolr   r   r   rX   rK   r+   r™   r   r   r   ú<module>r±      s  ðØ €€€Ø Ð Ð Ð Ø Ð Ð Ð Ø €€€Ø Ð Ð Ð à KÐ KÐ KÐ KÐ KÐ KÐ KÐ KÐ KÐ KÐ KÐ KÐ KÐ KÐ KÐ Kðð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ðQð Qð Qð 48ØØ ð:ð :Øð:à�T˜#”YÔð:ð ˜H T¨#¤YÔ/Ô0ð:ð ð	:ð
 ð:ð ÐÔ ð:ð :ð :ð :ðB Ø ð$ð $Øð$à�T˜#”YÔð$ð �T˜#”YÔð$ð ð	$ð
 ð$ð ˆmÔð$ð $ð $ð $ðT Ø ð	"ð "Øð"à˜4 œ9Ô%ð"ð ð"ð ð	"ð ÐÔð"ð "ð "ð "ðP Ø ð	"ð "Øð"à�T˜#”YÔð"ð ð"ð ð	"ð ˆmÔð"ð "ð "ð "ðP *.ð?ð
  #Ø ØØØ"#Ø!Ø !Ø !ØØ48Ø<@Ø Øð#?ð ?ð ?Øð?à�ŒIð?ð ˜D œIÔ&ð?ð
 ð?ð ð?ð ð?ð ð?ð  ð?ð ð?ð ð?ð ð?ð ð?ð !  d¨3¤i¤Ô1ð?ð ˜˜c 4¨¤9¨d°3¬iÐ7Ô8Ô9ð?ð  ð!?ð" ð#?ð$ Ð"Ô#ð%?ð ?ð ?ð ?ðJ Ø ð	Nð ØØØØ"#Ø!Ø !Ø !ØØ48Ø<@Ø)-Ø $Ø7;ð'Nð Nð NØðNà�$�s”)˜T $ s¤)œ_Ð,Ô-ðNð ðNð ð	Nð ðNð ðNð ðNð ðNð  ðNð ðNð ðNð ðNð ðNð !  d¨3¤i¤Ô1ðNð  ˜˜c 4¨¤9¨d°3¬iÐ7Ô8Ô9ð!Nð" ˜D œIÔ&ð#Nð$ ð%Nð& Ð,Ð-¨tÐ3Ô4ð'Nð( Ð"Ô#ð)Nð Nð Nð Nðh Ø ð	Oð ØØØØ"#Ø!Ø !Ø !ØØ48Ø<@Ø)-Ø $Ø7;ð'Oð Oð OØðOà�$�s”)˜T $ s¤)œ_Ð,Ô-ðOð ðOð ð	Oð ðOð ðOð ðOð ðOð  ðOð ðOð ðOð ðOð ðOð !  d¨3¤i¤Ô1ðOð  ˜˜c 4¨¤9¨d°3¬iÐ7Ô8Ô9ð!Oð" ˜D œIÔ&ð#Oð$ ð%Oð& Ð,Ð-¨tÐ3Ô4ð'Oð( Ð'Ô(ð)Oð Oð Oð Oðd%%ð %%ð %%ð %%ð %%ñ %%ô %%ð %%ðP3ð 3ð 3ðl'ð 'ð 'ð< ð  ð  ð  ð  r   