
    cCi+                     v    S r SSKrSSKJr  SSKJrJrJr   " S S\5      r " S S	\S
S9r	 " S S\5      r
S/rg)z
Processor class for ViLT.
    N)Optional   )ImagesKwargsProcessingKwargsProcessorMixinc                   &    \ rS rSr% \\   \S'   Srg)ViltImagesKwargs   size_divisor N)__name__
__module____qualname____firstlineno__r   int__annotations____static_attributes__r       b/home/james-whalen/.local/lib/python3.13/site-packages/transformers/models/vilt/processing_vilt.pyr	   r	      s    3-r   r	   c            
       :    \ rS rSr% \\S'   SSSSSSSSSS.0rSrg	)
ViltProcessorKwargs   images_kwargstext_kwargsTFr   )add_special_tokenspaddingstridereturn_overflowing_tokensreturn_special_tokens_maskreturn_offsets_mappingreturn_lengthverboser   N)r   r   r   r   r	   r   	_defaultsr   r   r   r   r   r      s/    ##"&).*/&+"	
Ir   r   F)totalc                   d   ^  \ rS rSrSrSS/rSrSr\r	SU 4S jjr
\S 5       r\S	 5       rS
rU =r$ )ViltProcessor-   aQ  
Constructs a ViLT processor which wraps a BERT tokenizer and ViLT image processor into a single processor.

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

Args:
    image_processor (`ViltImageProcessor`, *optional*):
        An instance of [`ViltImageProcessor`]. The image processor is a required input.
    tokenizer (`BertTokenizerFast`, *optional*):
        An instance of ['BertTokenizerFast`]. The tokenizer is a required input.
image_processor	tokenizerViltImageProcessor)BertTokenizerBertTokenizerFastc                    > S nSU;   a,  [         R                  " S[        5        UR                  S5      nUb  UOUn[        TU ]  X5        U R                  U l        g )Nfeature_extractorzhThe `feature_extractor` argument is deprecated and will be removed in v5, use `image_processor` instead.)warningswarnFutureWarningpopsuper__init__r(   current_processor)selfr(   r)   kwargsr.   	__class__s        r   r4   ViltProcessor.__init__@   s_     &(MM
 !'

+> ?-<-H/N_4!%!5!5r   c                 P    [         R                  " S[        5        U R                  $ )Nzg`feature_extractor_class` is deprecated and will be removed in v5. Use `image_processor_class` instead.)r/   r0   r1   image_processor_classr6   s    r   feature_extractor_class%ViltProcessor.feature_extractor_classN   s"    u	
 )))r   c                 P    [         R                  " S[        5        U R                  $ )Nz[`feature_extractor` is deprecated and will be removed in v5. Use `image_processor` instead.)r/   r0   r1   r(   r<   s    r   r.   ViltProcessor.feature_extractorV   s"    i	
 ###r   )r5   )NN)r   r   r   r   __doc__
attributesr;   tokenizer_classr   valid_processor_kwargsr4   propertyr=   r.   r   __classcell__)r8   s   @r   r&   r&   -   sR     $[1J0<O06 * * $ $r   r&   )rA   r/   typingr   processing_utilsr   r   r   r	   r   r&   __all__r   r   r   <module>rJ      sJ      N N |  *%  /$N /$d 
r   