+
    :&ÏjgS  ã                   óº  € ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIHtHtHtH	t	H
t
Ht ^ RIHtHtHtHtHtHt R tR/R R lltR0R R lltR1R	 R
 lltR0R R lltR2RRR^R^R^R^RRR^R^ RRRRRRRRRR/R R llltR3RR R!^ R^R^R^RRR^R^ RRRRRRR"RR#R$R%R/R& R' llltR3RR R!^ R^R^R^RRR^R^ RRRRRRR"RR#R$R%R/R( R) lllt ! R* R+4      tR, tR- tR. tR# )4é    N)ÚAsyncIterableÚCallableÚIterableÚListÚOptionalÚUnion)ÚGenerationResultÚGenerationStepResultÚ	GeneratorÚScoringResultÚTranslationResultÚ
Translatorc                 ó,  € \        \        R\        4       \        \        R\        4       \        \        R\        4       \        \
        R\        4       \        \
        R\        4       \        \
        R\        4       \        \
        R\        4       R# )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© ó    ÚP/opt/data/cache/scratch/pip-target-elquwxdg/lib/python/ctranslate2/extensions.pyÚregister_extensionsr       sd   € äŒJÐ,Ô.KÔLÜŒJÐ(Ô*CÔDÜŒJÐ)Ô+EÔFÜŒIÐ*Ô,GÔHÜŒIÐ'Ô)AÔBÜŒIÐ(Ô*CÔDÜŒIÐ.Ô0OÖPr   c                óä   € V ^8„  d   QhR\         R\        \        \        ,          ,          R\        \        \        \        ,          ,          ,          R\
        R\        R\        \        ,          /# )é   Ú
translatorÚsourceÚtarget_prefixÚmax_batch_sizeÚ
batch_typeÚreturn)r   r   r   Ústrr   Úintr   )Úformats   "r   Ú__annotate__r,      sa   € ÷ :ñ :Üð:ä”Tœ#•YÕð:ô œH¤T¬#¥YÕ/Õ0ð:ô ð	:ô
 ð:ô ÔÕ ñ:r   c              +  ó„   "  € V.pVe   VP                  V4       \        V P                  VVV3/ VB  Rj  x€L
  R#  L5i)a¾  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      sQ   é € ð` �€IØÒ Ø×Ñ˜Ô'ä Ø×"Ñ"ØØØñ	ð
 ñ÷ ô ùs   ‚5A ·>¸A c                óÎ   € V ^8„  d   QhR\         R\        \        \        ,          ,          R\        \        \        ,          ,          R\        R\        R\        \
        ,          /# )r"   r#   r$   Útargetr&   r'   r(   )r   r   r   r)   r*   r   )r+   s   "r   r,   r,   [   s[   € ÷ $ñ $Üð$ä”Tœ#•YÕð$ô ”Tœ#•YÕð$ô ð	$ô
 ð$ô ŒmÕñ$r   c              +  óV   "  € \        V P                  W.VV3/ VB  Rj  x€L
  R#  L5i)a9  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$   r4   r&   r'   r1   s   &&&&&,r   r   r   [   s8   é € ô< !Ø×ÑØ	ÐØØñ	ð
 ñ÷ ô ùó   ‚) '¡)c                ó–   € V ^8„  d   QhR\         R\        \        \        ,          ,          R\        R\        R\        \
        ,          /# )r"   Ú	generatorÚstart_tokensr&   r'   r(   )r   r   r   r)   r*   r	   )r+   s   "r   r,   r,   ‚   sI   € ÷ "ñ "Üð"äœ4¤�9Õ%ð"ô ð"ô ð	"ô ÔÕñ"r   c              +  óV   "  € \        V P                  V.VV3/ VB  Rj  x€L
  R#  L5i)a#  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)r:   r;   r&   r'   r1   s   &&&&,r   r   r   ‚   s7   é € ô8 !Ø× Ñ Ø	ˆØØñ	ð
 ñ÷ ô ùr8   c                ó–   € V ^8„  d   QhR\         R\        \        \        ,          ,          R\        R\        R\        \
        ,          /# )r"   r:   Útokensr&   r'   r(   )r   r   r   r)   r*   r   )r+   s   "r   r,   r,   §   sH   € ÷ "ñ "Üð"ä”Tœ#•YÕð"ô ð"ô ð	"ô ŒmÕñ"r   c              +  óV   "  € \        V P                  V.VV3/ VB  Rj  x€L
  R#  L5i)aù  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.
Nr6   )r:   r?   r&   r'   r1   s   &&&&,r   r   r   §   s7   é € ô8 !Ø×ÑØ	ˆØØñ	ð
 ñ÷ ô ùr8   Úmax_decoding_lengthé   Úmin_decoding_lengthÚsampling_topkÚsampling_toppÚsampling_temperatureÚreturn_log_probFÚrepetition_penaltyÚno_repeat_ngram_sizeÚdisable_unkÚsuppress_sequencesÚ	end_tokenÚmax_input_lengthi   Úuse_vmapc          #      óì  € V ^8„  d   QhR\         R\        \        ,          R\        \        \        ,          ,          R\        R\        R\        R\
        R\
        R	\        R
\
        R\        R\        R\        \        \        \        ,          ,          ,          R\        \        \        \        \        ,          \        \        ,          3,          ,          R\        R\        R\        \        ,          /# )r"   r#   r$   r%   rA   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   r(   )
r   r   r)   r   r*   ÚfloatÚboolr   r   r
   )r+   s   "r   r,   r,   Ì   së   € ÷ ?ñ ?Üð?ä”�Ið?ô œD¤�IÕ&ð?ô
 ð?ô ð?ô ð?ô ð?ô  ð?ô ð?ô ð?ô ð?ô ð?ô !¤¤d¬3¥i¥Õ1ð?ô œœc¤4¬¥9¬d´3­iÐ7Õ8Õ9ð?ô  ð!?ô" ð#?ô$ Ô"Õ#ñ%?r   c             #  ó|   "  € \        V P                  V.Ve   V.MRV	V
VVVVVVVVVVVR7       Rj  x€L
  R#  L5i)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)rH   rI   rJ   rK   rL   rA   rC   rD   rE   rF   Úreturn_scoresrM   rN   )Ú_generate_tokensr0   )r#   r$   r%   rA   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   s   &&&$$$$$$$$$$$$$r   r   r   Ì   s[   é € ô\  Ø×"Ñ"Ø	ˆØ(Ò4ˆ‰¸$Ø-Ø1ØØ-ØØ/Ø/Ø#Ø#Ø1Ø%Ø)Øô!÷ ô ùs   ‚1<³:´<Ú
max_lengthi   Ú
min_lengthÚstatic_promptÚcache_static_promptTÚcallbackc          '      óv  € V ^8„  d   QhR\         R\        \        \        ,          \        \        \        ,          ,          3,          R\        R\        R\        R\        R\        R\
        R	\
        R
\        R\
        R\        R\        R\        \        \        \        ,          ,          ,          R\        \        \        \        \        ,          \        \        ,          3,          ,          R\        \        \        ,          ,          R\        R\        \        .\        3,          R\        \        ,          /# ©r"   r:   Úpromptr&   r'   rU   rV   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rW   rX   rY   r(   )r   r   r   r)   r*   rP   rQ   r   r   r
   r   )r+   s   "r   r,   r,     s4  € ÷ 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r   c             #  ó  "  € \        V4      ^ 8”  d!   \        V^ ,          \        4      '       d   V.p\        V P                  V3/ RVbRVbRV
bRVbRVbRVbRVbRVbR	VbR
VbRVbRVbRV	bRVbRVbRRbRVb  Rj  x€L
  R#  L5i)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'   rH   rI   rJ   rK   rL   rU   rV   rD   rE   rF   rS   rW   rX   Úinclude_prompt_in_resultFrY   N)ÚlenÚ
isinstancer)   rT   r=   )r:   r\   r&   r'   rU   rV   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rW   rX   rY   s   &&&&$$$$$$$$$$$$$$r   r   r     sò   é € ôp ˆ6ƒ{�Q„œ: f¨Q¥i´×5Ò5Ø�ˆÜØ× Ñ Øòñ &ðñ ð	ñ
 .ðñ 2ðñ  ðñ .ðñ ðñ ðñ ðñ $ðñ $ðñ 2ðñ &ðñ  $ð!ñ" 0ð#ñ$ "'ð%ñ& ð'÷ ô ùs   ‚A<BÁ>BÁ?Bc          '      óv  € V ^8„  d   QhR\         R\        \        \        ,          \        \        \        ,          ,          3,          R\        R\        R\        R\        R\        R\
        R	\
        R
\        R\
        R\        R\        R\        \        \        \        ,          ,          ,          R\        \        \        \        \        ,          \        \        ,          3,          ,          R\        \        \        ,          ,          R\        R\        \        .\        3,          R\        \        ,          /# r[   )r   r   r   r)   r*   rP   rQ   r   r   r
   r   )r+   s   "r   r,   r,   _  s4  € ÷ 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r   c              ó&  "  € \        V4      ^ 8”  d!   \        V^ ,          \        4      '       d   V.p\        V P                  V3/ RVbRVbRV
bRVbRVbRVbRVbRVbR	VbR
VbRVbRVbRV	bRVbRVbRRbRVb   Rj  x€L
  pV5x € K   LDR# 5i)av  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'   rH   rI   rJ   rK   rL   rU   rV   rD   rE   rF   rS   rW   rX   r^   FrY   N)r_   r`   r)   ÚAsyncGeneratorr=   )r:   r\   r&   r'   rU   rV   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rW   rX   rY   Ústep_results   &&&&$$$$$$$$$$$$$$ r   r   r   _  s  é € ôp ˆ6ƒ{�Q„œ: f¨Q¥i´×5Ò5Ø�ˆÜ+Ø× Ñ Øòñ &ðñ ð	ñ
 .ðñ 2ðñ  ðñ .ðñ ðñ ðñ ðñ $ðñ $ðñ 2ðñ &ðñ  $ð!ñ" 0ð#ñ$ "'ð%ñ& ñ'÷ ð ˆkð* Õñ+ò ùs*   ‚A9BÁ;BÁ?BÂ BÂ	BÂBÂBc                   ó8   a € ] tR tRt o R tR tR tR tRtV t	R# )rc   i±  c                ó    € \         P                  ! 4       V n        \        P                  ! 4       V n        R V n        Wn        W n        W0n	        R # ©N)
ÚasyncioÚQueueÚqueueÚ	threadingÚEventÚshutdown_eventÚiterator_taskÚprocess_funcÚargsr1   )Úselfro   rp   r1   s   &&*,r   Ú__init__ÚAsyncGenerator.__init__²  s6   € Ü—]’]“_ˆŒ
Ü'ŸošoÓ/ˆÔØ!ˆÔØ(ÔØŒ	ØŽr   c              ƒ  óŽ  "  € \        V P                  .V P                  O5/ V P                  B  Ff  pV P                  P                  V4      G R j  x€L
  \        P                  ! R4      G R j  x€L
  V P                  P                  4       '       g   Kf   M	  V P                  P                  R 4      G R j  x€L
  R #  Lm LQ L
5i)Ng-Cëâ6?)
rT   ro   rp   r1   rj   Úputrh   Úsleeprm   Úis_set)rq   rd   s   & r   ÚproducerÚAsyncGenerator.producerº  sœ   é € ä+Ø×Ñð
Ø $§	¡	ò
Ø-1¯[©[ô
ˆKð —*‘*—.‘. Ó-×-Ð-Ü—-’- Ó'×'Ð'à×"Ñ"×)Ñ)×+Ô+Ùñ
ð �j‰j�n‰n˜TÓ"×"Ò"ñ .Ù'ñ 	#ùs<   ‚ACÁB?ÁCÁ/CÁ0!CÂ"CÂ8CÂ9CÃCÃCc                óX   € \         P                  ! V P                  4       4      V n        V # rg   )rh   Úcreate_taskrx   rn   )rq   s   &r   Ú	__aiter__ÚAsyncGenerator.__aiter__Æ  s    € Ü$×0Ò0°·±³ÓAˆÔØˆr   c              ƒ  ó^  "  € V P                   P                  4       '       d   \        h V P                  P	                  4       G R j  x€L
 pVf!   V P                   P                  4        \        hV#  L*  \        P                   d"    T P                   P                  4        \        hi ; i5irg   )rm   rw   ÚStopAsyncIterationrj   ÚgetÚsetrh   ÚCancelledError)rq   Úitems   & r   Ú	__anext__ÚAsyncGenerator.__anext__Ê  s�   é € Ø×Ñ×%Ñ%×'Ò'Ü$Ð$ð	%ØŸ™Ÿ™Ó)×)ˆDØŠ|Ø×#Ñ#×'Ñ'Ô)Ü(Ð(ØˆKñ	 *øô
 ×%Ñ%ô 	%Ø×Ñ×#Ñ#Ô%Ü$Ð$ð	%üs.   ‚'B-ªA4 ÁA2Á)A4 Á1B-Á2A4 Á46B*Â*B-)rp   rn   r1   ro   rj   rm   N)
Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__rr   rx   r|   r„   Ú__static_attributes__Ú__classdictcell__)Ú__classdict__s   @r   rc   rc   ±  s   ø‡ € òò
#ò÷%ð %r   rc   c              /   ó  aaa	a
"  € \         P                  ! 4       o	\        P                  ! 4       oVP	                  R R4      o
S
f   R o
VV	V
3R lpVP                  RRR^R V/4       V ! V/ VB oVV	3R lp\        P                  ! VRR7      pVP                  4         S	P	                  4       pVf   M\        V\        4      '       d   Vh Vx € K5  VP                  4        R#   \         d    SP                  4         K0  i ; i5i)	rY   Nc                 ó   € R # )Fr   )rd   s   &r   Ú<lambda>Ú"_generate_tokens.<locals>.<lambda>ß  s   € ©Er   c                 ój   <€ S! V 4      pSP                  V 4       SP                  4       ;'       g    T# rg   )ru   rw   )rd   Úuser_callback_resultÚgenerator_closedÚstep_resultsÚuser_callbacks   & €€€r   Ú	_callbackÚ#_generate_tokens.<locals>._callbacká  s4   ø€ Ù,¨[Ó9ÐØ×Ñ˜Ô%à×&Ñ&Ó(×@Ð@Ð,@Ð@r   ÚasynchronousTÚ	beam_sizec                  ó°   <€  S F  p V P                  4        K  	  SP                  R 4       R #   \         d   pSP                  T4        R p?L4R p?ii ; irg   )ÚresultÚ	Exceptionru   )r›   ÚeÚasync_resultsr”   s     €€r   Ú_catch_exceptionÚ*_generate_tokens.<locals>._catch_exceptionñ  sN   ø€ ð	 Û'�Ø—‘–ñ (ð 	×Ñ˜Öøô ô 	 Ø×Ñ˜Q×Ñûð	 ús   ƒ/ ¯AºAÁA)r4   Údaemon)rj   ri   rk   rl   r€   ÚupdateÚThreadÚstartr`   rœ   ÚGeneratorExitr�   Újoin)ro   rp   r1   r–   rŸ   Úthreadrd   rž   r“   r”   r•   s   &*,    @@@@r   rT   rT   Ù  s÷   ûé € Ü—;’;“=€LÜ —’Ó(Ðà—J‘J˜z¨4Ó0€MØÒÙ1ˆ÷Að ‡M�Mà˜DØ˜Ø˜	ð	
ôñ ! $Ð1¨&Ñ1€Möô ×ÒÐ%5¸dÔC€FØ
‡L�L„Nà
Ø"×&Ñ&Ó(ˆàÒØä�k¤9×-Ò-ØÐð	ØÔð ‡K�K†Møô ô 	Ø× Ñ Ô"Úð	üs*   †CD	ÃC' ÃD	Ã'DÄD	ÄDÄD	c              +   óJ  "  € V^8  d   \        R4      h\        V4      ^8X  d   V^ ,          pM\        P                  ! V!  pVP	                  RVRVRR/4       V^8”  d
   V^,          MTp\
        P                  ! 4       p\        WVV4       Fe  pVP                  ! V ! V/ VB 4       V'       g   K%  V^ ,          P                  4       '       g   KD  VP                  ! 4       P                  4       x € KL  	  V'       d$   VP                  ! 4       P                  4       x € K+  R# 5i)é   zmax_batch_size must be >= 1r&   r'   r˜   TN)Ú
ValueErrorr_   Ú	itertoolsÚzip_longestr¢   ÚcollectionsÚdequeÚ_batch_iteratorÚextendÚdoneÚpopleftr›   )	ro   r2   r&   r'   r1   ÚiterableÚread_batch_sizerj   Ústreamss	   &&&&,    r   r/   r/     sð   é € Ø˜ÔÜÐ6Ó7Ð7ä
ˆ9ƒ~˜ÔØ˜Q•<‰ä×(Ò(¨)Ñ4ˆà
‡M�Mà˜nØ˜*Ø˜Dð	
ôð .<¸aÔ-?�n rÖ)À^€OÜ×ÒÓ€Eä" 8¸jÖIˆØ�Š‘\ 7Ð5¨fÑ5Ô6ç‰e˜˜a�Ÿ™ŸœØ—-’-“/×(Ñ(Ó*Ô*ñ	 J÷ Ø�mŠm‹o×$Ñ$Ó&Ô&ñ ùs   ‚B+D#Â2D#Ã,D#Ã>%D#c              #   óª  "  € R p^ pV  EF9  p\        V\        4      '       g   V3pVR8X  d'   V'       d   \        V^ ,          4      V8X  d   Vx € R pM{VR8X  dc   \        V\        V^ ,          4      4      pV'       d>   \        V^ ,          4      ^,           V,          V8”  d   Vx € R p\        V^ ,          4      pM\	        RV,          4      hVf-   \        ;QJ d    . R V 4       F  NK  	  5M! R V 4       4      p\        W54       F5  w  rgVf   \        V4      ^8”  d   \	        R4      hVP                  V4       K7  	  EK<  	  Ve   Vx € R # R # 5i)NÚexamplesr?   zInvalid batch type %sc              3   ó&   "  € T F  p. x € K	  	  R # 5irg   r   )Ú.0Ú_s   & r   Ú	<genexpr>Ú"_batch_iterator.<locals>.<genexpr>F  s   é € Ð0© 1�B«ùs   ‚z+Input iterables do not have the same length)r`   Útupler_   Úmaxrª   Úzipr.   )r³   Ú
batch_sizer'   rµ   rU   ÚexampleÚbatchÚelements   &&&     r   r¯   r¯   -  s#  é € Ø€GØ€JäˆÜ˜'¤5×)Ò)Ø�jˆGà˜Ô#ßœ3˜w q�z›?¨jÔ8Ø’Ø�øà˜8Ô#Ü˜Z¬¨W°Q­Z«Ó9ˆJçœC ¨¥
›O¨aÕ/°:Õ=À
ÔJØ’Ø�Ü  ¨¥›_�
øô Ð4°zÕAÓBÐBàŠ?ß”eÑ0©Ó0—e‘eÑ0©Ó0Ó0ˆGÜ! 'Ö3‰NˆEØŠ¤3 w£<°!Ô#3Ü Ð!NÓOÐOØ�L‰L˜Ö!ô 4ñ- ð6 ÒØŒñ ùs   ‚2EµB'EÃA6E)Né    r·   )é@   r·   )rÄ   r·   rg   )r   r·   )rh   r­   r«   rj   rk   Útypingr   r   r   r   r   r   Úctranslate2._extr	   r
   r   r   r   r   r    r   r   r   r   r   r   r   rc   rT   r/   r¯   r   r   r   Ú<module>rÈ      s;  ðÛ Û Û Û Û ç K× K÷÷ òQ÷:÷z$÷N"÷J"ñJ?ð
  #ð?ð  !ð?ð ð?ð ð?ð #$ð?ð "ð?ð !"ð?ð !"ð?ð ð?ð 59ð?ð =Að?ð  !ð!?ð" ÷#?ð ?ñDNð ðNð ðNð ðNð ðNð #$ðNð "ðNð !"ðNð !"ðNð ðNð 59ðNð  =Að!Nð" *.ð#Nð$ !%ð%Nð& 8<÷'Nð NñbOð ðOð ðOð ðOð ðOð #$ðOð "ðOð !"ðOð !"ðOð ðOð 59ðOð  =Að!Oð" *.ð#Oð$ !%ð%Oð& 8<÷'Oð O÷d%%ñ %%òP3òl'ô< r   