ó
ù`]c           @@ sO   d  d l  m Z m Z d  d l Z d  d l m Z d e j f d „  ƒ  YZ d S(   i    (   t   absolute_importt   unicode_literalsN(   t   RegexpParsert   TestChunkRulec           B@ s   e  Z d  „  Z RS(   c      $   C@ s¦   d6 d7 d8 d9 d: d; d< d= d> d? d@ dA dB dC dD dE dF dG dH dI dJ dK dL dM dN dO dP dQ dR dS dT dU dV dW dX g# } t  d3 ƒ } | j | ƒ } | j ƒ  d4 k s¢ t ‚ d5 S(Y   u!  Test for bug https://github.com/nltk/nltk/issues/1597

        Ensures that curly bracket quantifiers can be used inside a chunk rule.
        This type of quantifier has been used for the supplementary example
        in http://www.nltk.org/book/ch07.html#exploring-text-corpora.
        u   Theu   ATu   September-Octoberu   NPu   termu   NNu   juryu   hadu   HVDu   beenu   BENu   chargedu   VBNu   byu   INu   Fultonu   NP-TLu   Superioru   JJ-TLu   Courtu   NN-TLu   Judgeu   Durwoodu   Pyeu   tou   TOu   investigateu   VBu   reportsu   NNSu   ofu   possibleu   JJu   ``u   irregularitiesu   ''u   inu   theu   hard-foughtu   primaryu   whichu   WDTu   wasu   BEDZu   wonu   Mayor-nominateu   Ivanu   Allenu   Jr.u   .u   CHUNK: {<N.*>{4,}}u­  (S
  The/AT
  September-October/NP
  term/NN
  jury/NN
  had/HVD
  been/BEN
  charged/VBN
  by/IN
  Fulton/NP-TL
  Superior/JJ-TL
  (CHUNK Court/NN-TL Judge/NN-TL Durwood/NP Pye/NP)
  to/TO
  investigate/VB
  reports/NNS
  of/IN
  possible/JJ
  ``/``
  irregularities/NNS
  ''/''
  in/IN
  the/AT
  hard-fought/JJ
  primary/NN
  which/WDT
  was/BEDZ
  won/VBN
  by/IN
  (CHUNK Mayor-nominate/NN-TL Ivan/NP Allen/NP Jr./NP)
  ./.)N(   u   Theu   AT(   u   September-Octoberu   NP(   u   termu   NN(   u   juryu   NN(   u   hadu   HVD(   u   beenu   BEN(   u   chargedu   VBN(   u   byu   IN(   u   Fultonu   NP-TL(   u   Superioru   JJ-TL(   u   Courtu   NN-TL(   u   Judgeu   NN-TL(   u   Durwoodu   NP(   u   Pyeu   NP(   u   tou   TO(   u   investigateu   VB(   u   reportsu   NNS(   u   ofu   IN(   u   possibleu   JJ(   u   ``u   ``(   u   irregularitiesu   NNS(   u   ''u   ''(   u   inu   IN(   u   theu   AT(   u   hard-foughtu   JJ(   u   primaryu   NN(   u   whichu   WDT(   u   wasu   BEDZ(   u   wonu   VBN(   u   byu   IN(   u   Mayor-nominateu   NN-TL(   u   Ivanu   NP(   u   Allenu   NP(   u   Jr.u   NP(   u   .u   .(   R   t   parset   pformatt   AssertionError(   t   selft   sentt   cpt   tree(    (    s8   lib/python2.7/site-packages/nltk/test/unit/test_chunk.pyt&   test_tag_pattern2re_pattern_quantifier	   sN    		(   t   __name__t
   __module__R   (    (    (    s8   lib/python2.7/site-packages/nltk/test/unit/test_chunk.pyR      s   (   t
   __future__R    R   t   unittestt   nltkR   t   TestCaseR   (    (    (    s8   lib/python2.7/site-packages/nltk/test/unit/test_chunk.pyt   <module>   s   