U
    Bew
                     @   s>   d dl Z d dlmZ d dlmZmZmZ dZG dd dZ	dS )    N)rte)RTEFeatureExtractorrte_featuresrte_classifiera  
alwayson        => True
ne_hyp_extra    => 0
ne_overlap      => 1
neg_hyp         => 0
neg_txt         => 0
word_hyp_extra  => 3
word_overlap    => 3

alwayson        => True
ne_hyp_extra    => 0
ne_overlap      => 1
neg_hyp         => 0
neg_txt         => 0
word_hyp_extra  => 2
word_overlap    => 1

alwayson        => True
ne_hyp_extra    => 1
ne_overlap      => 1
neg_hyp         => 0
neg_txt         => 0
word_hyp_extra  => 1
word_overlap    => 2

alwayson        => True
ne_hyp_extra    => 1
ne_overlap      => 0
neg_hyp         => 0
neg_txt         => 0
word_hyp_extra  => 6
word_overlap    => 2

alwayson        => True
ne_hyp_extra    => 1
ne_overlap      => 0
neg_hyp         => 0
neg_txt         => 0
word_hyp_extra  => 4
word_overlap    => 0

alwayson        => True
ne_hyp_extra    => 1
ne_overlap      => 0
neg_hyp         => 0
neg_txt         => 0
word_hyp_extra  => 3
word_overlap    => 1
c                   @   s8   e Zd Zdd Zdd Zdd Zejddd	 Z	d
S )TestRTEClassifierc                 C   sN   t dgd d }dd |D }t d}ttd |}||ksJtd S )Nzrte1_dev.xml   c                 S   s2   g | ]*}t t|D ]}d |t|| f qqS )z%-15s => %s)sortedr   ).0pairkey r   |/var/www/nmhs-web.org.in/public_html/infoladakh/backend/venv/lib/python3.8/site-packages/nltk/test/unit/test_rte_classify.py
<listcomp>?   s    zATestRTEClassifier.test_rte_feature_extraction.<locals>.<listcomp>
)
rte_corpuspairs#expected_from_rte_feature_extrationstripsplitlistfilterAssertionError)selfr   Ztest_outputZexpected_outputr   r   r   test_rte_feature_extraction=   s    z-TestRTEClassifier.test_rte_feature_extractionc                 C   sl   t dgd }t|}|jdddhks,t|dt ks@t|ddhksTt|ddhkshtd S )Nzrte3_dev.xml!   memberZChinazSCO.wordne)r   r   r   Z	hyp_wordsr   overlapsetZ	hyp_extra)r   ZrtepairZ	extractorr   r   r   test_feature_extractor_objectJ   s    z/TestRTEClassifier.test_feature_extractor_objectc                 C   s   t ddd}t ddd}d S )NZIISd   Zsample_NZGIS)r   r   Zclfr   r   r   %test_rte_classification_without_megamT   s    z7TestRTEClassifier.test_rte_classification_without_megamz)Skipping tests with dependencies on MEGAMc                 C   s&   t d tddd}tddd}d S )Nz/usr/local/bin/megamZmegamr!   r"   ZBFGS)ZnltkZconfig_megamr   r#   r   r   r   "test_rte_classification_with_megamZ   s    
z4TestRTEClassifier.test_rte_classification_with_megamN)
__name__
__module____qualname__r   r    r$   pytestmarkskipr%   r   r   r   r   r   ;   s
   

r   )
r)   Znltk.corpusr   r   Znltk.classify.rte_classifyr   r   r   r   r   r   r   r   r   <module>   s   3