
    +gd{                         d dl Z d dlmZmZ d dlmZmZ ddlmZm	Z	m
Z
 ddlmZ  ed	           G d
 de                      ZdS )    N)	dataclassfield)ClassVarDict   )
ClassLabelFeaturesValue   )TaskTemplateT)frozenc                       e Zd ZU  edddi          Zeed<    ed ed          i          Z	e
e         ed<    ed	ei          Ze
e         ed
<   dZeed<   d	Zeed<   d Zedeeef         fd            ZdS )TextClassificationztext-classification$include_in_asdict_even_if_is_defaultT)defaultmetadatatasktextstringinput_schemalabelslabel_schematext_columnlabel_columnc                 F   | j         |vrt          d| j          d          t          || j                  t                    st          d| j          d          t	          j        |           }| j                                        }|| j                  |d<   ||j        d<   |S )NzColumn z is not present in features.z is not a ClassLabel.r   r   )r   
ValueError
isinstancer   copydeepcopyr   __dict__)selffeaturestask_templater   s       Blib/python3.11/site-packages/datasets/tasks/text_classification.pyalign_with_featuresz&TextClassification.align_with_features   s    H,,Vt'8VVVWWW(4#45zBB 	QOt'8OOOPPPd++(--//!)$*;!<X1=~.    returnc                 "    | j         d| j        diS )Nr   r   )r   r   )r!   s    r$   column_mappingz!TextClassification.column_mapping   s     fx
 	
r&   N)__name__
__module____qualname__r   r   str__annotations__r	   r
   r   r   r   r   r   r   r%   propertyr   r)    r&   r$   r   r   	   s          3?egk>lmmmD#mmm'/xx0I'J'JL(8$JJJ'/x:0F'G'GL(8$GGGK L#   	 	 	 
S#X 
 
 
 X
 
 
r&   r   )r   dataclassesr   r   typingr   r   r"   r   r	   r
   baser   r   r0   r&   r$   <module>r4      s     ( ( ( ( ( ( ( ( ! ! ! ! ! ! ! ! 2 2 2 2 2 2 2 2 2 2       $
 
 
 
 
 
 
 
 
 
r&   