U
    ƒe«  ã                   @   s*   d dl Z d dlmZ G dd„ de jƒZdS )é    N)ÚRegexpParserc                   @   s   e Zd Zdd„ ZdS )ÚTestChunkRulec              #   C   sp   ddddddddd	d
ddddddddddddddddddddddd d!d"g#}t d#ƒ}| |¡}| ¡ d$kslt‚d%S )&a"  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 https://www.nltk.org/book/ch07.html#exploring-text-corpora.
        )ZTheÚAT)zSeptember-OctoberÚNP)ÚtermÚNN)Zjuryr   )ZhadZHVD)ZbeenZBEN)ZchargedÚVBN)ZbyÚIN)ZFultonzNP-TL)ZSuperiorzJJ-TL)ZCourtúNN-TL)ZJudger
   )ZDurwoodr   )ZPyer   )ÚtoZTO)ZinvestigateZVB)ZreportsÚNNS)Zofr	   )ÚpossibleÚJJ)ú``r   )Zirregularitiesr   )ú''r   )Úinr	   )Zther   )zhard-foughtr   )Úprimaryr   )ÚwhichZWDT)ÚwasZBEDZ)Zwonr   )zMayor-nominater
   )ZIvanr   )ZAllenr   )zJr.r   )Ú.r   zCHUNK: {<N.*>{4,}}a­  (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)r   ÚparseÚpformatÚAssertionError)ÚselfÚsentÚcpÚtree© r   úZ/var/www/html/assets/scripts/venv/lib/python3.8/site-packages/nltk/test/unit/test_chunk.pyÚ&test_tag_pattern2re_pattern_quantifier   sT    Ý%
ÿÿz4TestChunkRule.test_tag_pattern2re_pattern_quantifierN)Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r      s   r   )ZunittestZnltkr   ZTestCaser   r   r   r   r   Ú<module>   s   