
    vj
                     ,   d dl mZ d dlmZ d dlmZ dZdZdZej	        eej	        ej
        ej        ej        ej        geej	        iej        eej        ej        ej        ej        geej	        iej        eej        ej        ej        ej        geej	        iej        eej        ej        geej        iej        eej        ej        geej        iej        eej        geej        iej        eej        geej        iiZd Z ee          Zdefd	Zd
 ZdS )    )
TaskModels)registry)Tasks	sub_tasksparent_task
task_modelc                     t                      }| D ]<}| |         t                   D ]&}t          |t          | |         t                   i||<   '=|S N)dict	SUB_TASKSPARENT_TASK
TASK_MODEL)forward_indexinverted_indexindexitems       k/lsinfo/ai/hellotax_ai/data_center/backend/venv/lib/python3.11/site-packages/modelscope/utils/task_utils.py_inverted_indexr   G   sc    VVN  !%(3 	 	DUM%0<$N4  	
     taskc                 "    | t           j        k    S r
   )r   sentence_embedding)r   s    r   is_embedding_taskr   U   s    5+++r   c                 |    | t           v r0t           |          t                   t           |          t                   fS | d fS r
   )INVERTED_TASKS_LEVELr   r   )	group_keys    r   get_task_by_subtask_namer   Y   sC    (((#I..y9*EF 	F $r   N)modelscope.metainfor   modelscope.utilsr   modelscope.utils.constantr   r   r   r   text_classificationsentence_similaritysentiment_classificationsentiment_analysisnlitoken_classificationnamed_entity_recognitionword_segmentationpart_of_speechtext_generationtext2text_generationinformation_extractionrelation_extraction	fill_masktext_rankingDEFAULT_TASKS_LEVELr   r   strr   r    r   r   <module>r3      s   * * * * * * % % % % % % + + + + + +	
 
%%*$I
 	&
  
&*# 	
 	&	! 
&*# 	
 	&	! 
!&
 	J. 
 (%
 	J5# 
OO
 	J(	 

 	J+	i; |   '':;; ,C , , , ,    r   