o
    Mf«  ã                   @   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   s.   g d¢}t dƒ}| |¡}| ¡ dksJ ‚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.
        )#)ÚTheÚAT)zSeptember-OctoberÚNP)ÚtermÚNN)Újuryr   )ÚhadÚHVD)ÚbeenÚBEN)ÚchargedÚVBN©ÚbyÚIN)ÚFultonzNP-TL)ÚSuperiorzJJ-TL)ÚCourtúNN-TL)ÚJudger   )ÚDurwoodr   )ÚPyer   )ÚtoÚTO)ÚinvestigateÚVB)ÚreportsÚNNS)Úofr   )ÚpossibleÚJJ)ú``r#   )Úirregularitiesr   )ú''r%   )Úinr   )Úther   )zhard-foughtr"   )Úprimaryr   )ÚwhichÚWDT)ÚwasÚBEDZ)Úwonr   r   )zMayor-nominater   )ÚIvanr   )ÚAllenr   )zJr.r   )Ú.r0   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)ÚselfÚsentÚcpÚtree© r7   ú[/var/www/html/analyze/labelStudio/lib/python3.10/site-packages/nltk/test/unit/test_chunk.pyÚ&test_tag_pattern2re_pattern_quantifier   s   %
ÿz4TestChunkRule.test_tag_pattern2re_pattern_quantifierN)Ú__name__Ú
__module__Ú__qualname__r9   r7   r7   r7   r8   r      s    r   )ÚunittestÚnltkr   ÚTestCaser   r7   r7   r7   r8   Ú<module>   s    