
    fTh                     l    S r SSKJrJrJr  SSKJr  SSKJrJ	r	J
r
JrJr  SSKJr   " S S\5      rS/rg	)
z
Processor class for Bros.
    )ListOptionalUnion   )ProcessorMixin)BatchEncodingPaddingStrategyPreTokenizedInput	TextInputTruncationStrategy)
TensorTypec            "         ^  \ rS rSrSrS/rSrSU 4S jjr               SS\\	\
\\	   \\
   4   S\S\\\\4   S	\\\\4   S
\\   S\S\\   S\\   S\\   S\S\S\S\S\S\\\\4      S\4 S jjrS rS r\S 5       rSrU =r$ )BrosProcessor   au  
Constructs a Bros processor which wraps a BERT tokenizer.

[`BrosProcessor`] offers all the functionalities of [`BertTokenizerFast`]. See the docstring of
[`~BrosProcessor.__call__`] and [`~BrosProcessor.decode`] for more information.

Args:
    tokenizer (`BertTokenizerFast`, *optional*):
        An instance of ['BertTokenizerFast`]. The tokenizer is a required input.
	tokenizer)BertTokenizerBertTokenizerFastc                 @   > Uc  [        S5      e[        TU ]	  U5        g )Nz"You need to specify a `tokenizer`.)
ValueErrorsuper__init__)selfr   kwargs	__class__s      `/var/www/auris/envauris/lib/python3.13/site-packages/transformers/models/bros/processing_bros.pyr   BrosProcessor.__init__)   s"    ABB#    textadd_special_tokenspadding
truncation
max_lengthstridepad_to_multiple_ofreturn_token_type_idsreturn_attention_maskreturn_overflowing_tokensreturn_special_tokens_maskreturn_offsets_mappingreturn_lengthverbosereturn_tensorsreturnc                 J    U R                   " SUUUUUUUUU	U
UUUUUS.UD6nU$ )z
This method uses [`BertTokenizerFast.__call__`] to prepare text for the model.

Please refer to the docstring of the above two methods for more information.
)r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,    )r   )r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r   encodings                     r   __call__BrosProcessor.__call__/   sU    0 >> 
1!!1"7"7&?'A#9')
  !
& r   c                 :    U R                   R                  " U0 UD6$ )z
This method forwards all its arguments to BertTokenizerFast's [`~PreTrainedTokenizer.batch_decode`]. Please
refer to the docstring of this method for more information.
)r   batch_decoder   argsr   s      r   r4   BrosProcessor.batch_decode\   s    
 ~~**D;F;;r   c                 :    U R                   R                  " U0 UD6$ )z
This method forwards all its arguments to BertTokenizerFast's [`~PreTrainedTokenizer.decode`]. Please refer to
the docstring of this method for more information.
)r   decoder5   s      r   r9   BrosProcessor.decodec   s    
 ~~$$d5f55r   c                 j    U R                   R                  n[        [        R	                  U5      5      $ N)r   model_input_nameslistdictfromkeys)r   tokenizer_input_namess     r   r=   BrosProcessor.model_input_namesj   s'     $ @ @DMM"7899r   r/   r<   )NTFNNr   NNNFFFFTN)__name__
__module____qualname____firstlineno____doc__
attributestokenizer_classr   r   r   r
   r   boolstrr	   r   r   intr   r   r1   r4   r9   propertyr=   __static_attributes____classcell__)r   s   @r   r   r      s^   	 J<O$ _c#'5:;?$(,00404*/+0',#;?!+I0$y/4HYCZZ[+ !+ tS/12	+
 $%778+ SM+ + %SM+  (~+  (~+ $(+ %)+ !%+ + +  !sJ!78!+$ 
%+Z<6 : :r   r   N)rG   typingr   r   r   processing_utilsr   tokenization_utils_baser   r	   r
   r   r   utilsr   r   __all__r/   r   r   <module>rU      s7    ) ( . w w S:N S:l 
r   