ó
ù`]c           @  sq   d  d l  m Z m Z d  d l Z d  d l m Z d  d l m Z m	 Z	 m
 Z
 d Z d e j f d „  ƒ  YZ d S(   iÿÿÿÿ(   t   print_functiont   unicode_literalsN(   t   rte(   t   RTEFeatureExtractort   rte_featurest   rte_classifieruŠ  
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
t   RTEClassifierTestc           B  s;   e  Z d  „  Z d „  Z d „  Z e j d ƒ d „  ƒ Z RS(   c         C  sš   t  j d g ƒ d  } g  | D]9 } t t | ƒ ƒ D]  } d | t | ƒ | f ^ q3 q } t j ƒ  j d ƒ } t t d  | ƒ ƒ } |  j
 | | ƒ d  S(   Nu   rte1_dev.xmli   u   %-15s => %su   
(   t
   rte_corpust   pairst   sortedR   t#   expected_from_rte_feature_extrationt   stript   splitt   listt   filtert   Nonet   assertEqual(   t   selfR   t   pairt   keyt   test_outputt   expected_output(    (    s?   lib/python2.7/site-packages/nltk/test/unit/test_rte_classify.pyt   test_rte_feature_extraction>   s    
9c         C  s–   t  j d g ƒ d } t | ƒ } |  j | j d d d h ƒ |  j | j d ƒ t ƒ  ƒ |  j | j d ƒ d h ƒ |  j | j d ƒ d h ƒ d  S(   Nu   rte3_dev.xmli!   u   memberu   Chinau   SCO.u   wordu   ne(   R   R   R   R   t	   hyp_wordst   overlapt   sett	   hyp_extra(   R   t   rtepairt	   extractor(    (    s?   lib/python2.7/site-packages/nltk/test/unit/test_rte_classify.pyt   test_feature_extractor_objectK   s    c         C  s   t  d ƒ } t  d ƒ } d  S(   Nu   IISu   GIS(   R   (   R   t   clf(    (    s?   lib/python2.7/site-packages/nltk/test/unit/test_rte_classify.pyt%   test_rte_classification_without_megamT   s    u)   Skipping tests with dependencies on MEGAMc         C  s)   t  j d ƒ t d ƒ } t d ƒ } d  S(   Nu   /usr/local/bin/megamu   megamu   BFGS(   t   nltkt   config_megamR   (   R   R   (    (    s?   lib/python2.7/site-packages/nltk/test/unit/test_rte_classify.pyt"   test_rte_classification_with_megamX   s    (   t   __name__t
   __module__R   R   R   t   unittestt   skipR"   (    (    (    s?   lib/python2.7/site-packages/nltk/test/unit/test_rte_classify.pyR   <   s   				(   t
   __future__R    R   R%   t   nltk.corpusR   R   t   nltk.classify.rte_classifyR   R   R   R
   t   TestCaseR   (    (    (    s?   lib/python2.7/site-packages/nltk/test/unit/test_rte_classify.pyt   <module>   s
   2