U
    rhL                     @  sH   d dl mZ d dlZd dlZd dlmZ d dlmZ G dd deZ	dS )    )annotationsN)Base)expectc                   @  sx   e Zd ZeddddZeddddZeddddZeddd	d
ZeddddZeddddZ	dS )StringNormalizerNone)returnc                  C  sH   t ddgt} | }tjjddgdgdd}t|| g|gdd	 d S )
Nmondaytuesdayr   xy   )inputsoutputsis_case_sensitiveZ+test_strnormalizer_nostopwords_nochangecaser   r   namenparrayastypeobjectonnxhelper	make_noder   )inputoutputnode r   P/tmp/pip-unpacked-wheel-xnis5xre/onnx/backend/test/case/node/stringnormalizer.pyexport_nostopwords_nochangecase   s    z0StringNormalizer.export_nostopwords_nochangecasec                  C  sf   t ddddgt} t dddgt}dg}tjjddgdgd|d	}t|| g|gd
d d S )Nr   r	   	wednesdaythursdayr   r
   r   r   )r   r   r   	stopwordsZ<test_strnormalizer_export_monday_casesensintive_nochangecaser   r   r   r   r"   r   r   r   r   )export_monday_casesensintive_nochangecase!   s     z:StringNormalizer.export_monday_casesensintive_nochangecasec                  C  sh   t ddddgt} t dddgt}dg}tjjddgdgdd	|d
}t|| g|gdd d S )Nr   r	   r    r!   r   r
   r   ZLOWERr   r   r   case_change_actionr   r"   Z5test_strnormalizer_export_monday_casesensintive_lowerr   r   r#   r   r   r   "export_monday_casesensintive_lower5   s"    z3StringNormalizer.export_monday_casesensintive_lowerc                  C  sh   t ddddgt} t dddgt}dg}tjjdd	gd
gdd|d}t|| g|gdd d S )Nr   r	   r    r!   TUESDAY	WEDNESDAYTHURSDAYr   r
   r   UPPERr   r%   Z5test_strnormalizer_export_monday_casesensintive_upperr   r   r#   r   r   r   "export_monday_casesensintive_upperJ   s"    z3StringNormalizer.export_monday_casesensintive_upperc                  C  s`   t ddgt} t dgt}dg}tjjddgdgdd|d}t|| g|gd	d
 d S )Nr    r   r
   r   r+   r   r%   Z-test_strnormalizer_export_monday_empty_outputr   r   r#   r   r   r   export_monday_empty_output_   s"    z+StringNormalizer.export_monday_empty_outputc                  C  s   t ddddddgtddg} t ddddgtddg}d	g}tjjd
dgdgd|d}t|| g|gdd d S )NZMondayr	   r    r      r(   r)      r   r   r
   r   r+   )r   r   r&   r"   Z:test_strnormalizer_export_monday_insensintive_upper_twodimr   )	r   r   r   r   Zreshaper   r   r   r   r#   r   r   r   'export_monday_insensintive_upper_twodimt   s8    z8StringNormalizer.export_monday_insensintive_upper_twodimN)
__name__
__module____qualname__staticmethodr   r$   r'   r,   r.   r1   r   r   r   r   r      s   r   )

__future__r   Znumpyr   r   Zonnx.backend.test.case.baser   Zonnx.backend.test.case.noder   r   r   r   r   r   <module>   s
   