+
    ÖÇÜh­P  ã                   óH  € ^ RI t ^ RIHt ^ RIHt ^ RIHt ^ RIH	t	 R t ! R R4      t
R	 tRR lt] P                  ! R4      tRR ltR tRR ltR t] P                  ! R] P&                  4      t] P                  ! R4      tR t. ROR
3R ltR t]R8X  d
   ]! 4        R# R# )é    N)Úaccuracy)Úmap_tag)Ú	str2tuple)ÚTreec                ó¸   € . p. pV FF  pV P                  VP                  4       4      pV\        V4      ,          pV\        V4      ,          pKH  	  \        W#4      # )aX  
Score the accuracy of the chunker against the gold standard.
Strip the chunk information from the gold standard and rechunk it using
the chunker, then compute the accuracy score.

:type chunker: ChunkParserI
:param chunker: The chunker being evaluated.
:type gold: tree
:param gold: The chunk structures to score the chunker on.
:rtype: float
)ÚparseÚflattenÚtree2conlltagsÚ	_accuracy)ÚchunkerÚgoldÚ	gold_tagsÚ	test_tagsÚ	gold_treeÚ	test_trees   &&    Ú1/usr/lib/python3/dist-packages/nltk/chunk/util.pyr   r      sZ   € ð €IØ€IÛˆ	Ø—M‘M )×"3Ñ"3Ó"5Ó6ˆ	Ø”^ IÓ.Õ.ˆ	Ø”^ IÓ.Õ.Š	ñ ô �YÓ*Ð*ó    c                   ó|   a € ] tR t^3t o RtR tR tR tR tR t	R t
RR ltR	 tR
 tR tR tR tR tR tRtV tR# )Ú
ChunkScoreao
  
A utility class for scoring chunk parsers.  ``ChunkScore`` can
evaluate a chunk parser's output, based on a number of statistics
(precision, recall, f-measure, misssed chunks, incorrect chunks).
It can also combine the scores from the parsing of multiple texts;
this makes it significantly easier to evaluate a chunk parser that
operates one sentence at a time.

Texts are evaluated with the ``score`` method.  The results of
evaluation can be accessed via a number of accessor methods, such
as ``precision`` and ``f_measure``.  A typical use of the
``ChunkScore`` class is::

    >>> chunkscore = ChunkScore()           # doctest: +SKIP
    >>> for correct in correct_sentences:   # doctest: +SKIP
    ...     guess = chunkparser.parse(correct.leaves())   # doctest: +SKIP
    ...     chunkscore.score(correct, guess)              # doctest: +SKIP
    >>> print('F Measure:', chunkscore.f_measure())       # doctest: +SKIP
    F Measure: 0.823

:ivar kwargs: Keyword arguments:

    - max_tp_examples: The maximum number actual examples of true
      positives to record.  This affects the ``correct`` member
      function: ``correct`` will not return more than this number
      of true positive examples.  This does *not* affect any of
      the numerical metrics (precision, recall, or f-measure)

    - max_fp_examples: The maximum number actual examples of false
      positives to record.  This affects the ``incorrect`` member
      function and the ``guessed`` member function: ``incorrect``
      will not return more than this number of examples, and
      ``guessed`` will not return more than this number of true
      positive examples.  This does *not* affect any of the
      numerical metrics (precision, recall, or f-measure)

    - max_fn_examples: The maximum number actual examples of false
      negatives to record.  This affects the ``missed`` member
      function and the ``correct`` member function: ``missed``
      will not return more than this number of examples, and
      ``correct`` will not return more than this number of true
      negative examples.  This does *not* affect any of the
      numerical metrics (precision, recall, or f-measure)

    - chunk_label: A regular expression indicating which chunks
      should be compared.  Defaults to ``'.*'`` (i.e., all chunks).

:type _tp: list(Token)
:ivar _tp: List of true positives
:type _fp: list(Token)
:ivar _fp: List of false positives
:type _fn: list(Token)
:ivar _fn: List of false negatives

:type _tp_num: int
:ivar _tp_num: Number of true positives
:type _fp_num: int
:ivar _fp_num: Number of false positives
:type _fn_num: int
:ivar _fn_num: Number of false negatives.
c                ó¶  € \        4       V n        \        4       V n        \        4       V n        \        4       V n        \        4       V n        VP                  R ^d4      V n        VP                  R^d4      V n        VP                  R^d4      V n	        VP                  RR4      V n
        ^ V n        ^ V n        ^ V n        ^ V n        RV n        RV n        RV n        R# )Úmax_tp_examplesÚmax_fp_examplesÚmax_fn_examplesÚchunk_labelz.*g        FN)ÚsetÚ_correctÚ_guessedÚ_tpÚ_fpÚ_fnÚgetÚ_max_tpÚ_max_fpÚ_max_fnÚ_chunk_labelÚ_tp_numÚ_fp_numÚ_fn_numÚ_countÚ_tags_correctÚ_tags_totalÚ_measuresNeedUpdate)ÚselfÚkwargss   &,r   Ú__init__ÚChunkScore.__init__r   s¯   € Ü›ˆŒÜ›ˆŒÜ“5ˆŒÜ“5ˆŒÜ“5ˆŒØ—z‘zÐ"3°SÓ9ˆŒØ—z‘zÐ"3°SÓ9ˆŒØ—z‘zÐ"3°SÓ9ˆŒØ"ŸJ™J }°dÓ;ˆÔØˆŒØˆŒØˆŒØˆŒØ ˆÔØˆÔà#(ˆÖ r   c                ó¤  € V P                   '       d¾   V P                  V P                  ,          V n        V P                  V P                  ,
          V n        V P                  V P                  ,
          V n        \        V P                  4      V n        \        V P
                  4      V n        \        V P                  4      V n	        R V n         R# R# )FN)
r,   r   r   r   r    r   Úlenr&   r'   r(   ©r-   s   &r   Ú_updateMeasuresÚChunkScore._updateMeasures…   s„   € Ø×#×#Ð#Ø—}‘} t§}¡}Õ4ˆDŒHØ—}‘} t§}¡}Õ4ˆDŒHØ—}‘} t§}¡}Õ4ˆDŒHÜ˜tŸx™x›=ˆDŒLÜ˜tŸx™x›=ˆDŒLÜ˜tŸx™x›=ˆDŒLØ',ˆDÖ$ñ $r   c           	     ó   € V ;P                   \        WP                  V P                  4      ,          un         V ;P                  \        W P                  V P                  4      ,          un        V ;P                  ^,          un        RV n         \        V4      p\        V4      pV ;P                  \        V4      ,          un        V ;P                  \        R \        WC4       4       4      ,          un
        R#   \         d    R;r4 Lfi ; i)a  
Given a correctly chunked sentence, score another chunked
version of the same sentence.

:type correct: chunk structure
:param correct: The known-correct ("gold standard") chunked
    sentence.
:type guessed: chunk structure
:param guessed: The chunked sentence to be scored.
Tc              3   ó:   "  € T F  w  rW8X  g   K  ^x € K  	  R# 5i)é   N© )Ú.0ÚtÚgs   &  r   Ú	<genexpr>Ú#ChunkScore.score.<locals>.<genexpr>¨   s   é € ð "
Ù;‘&�1¸q¹v�AŠAÓ;ùs   ‚
‘
Nr9   )r   Ú
_chunksetsr)   r%   r   r,   r
   Ú
ValueErrorr+   r2   r*   ÚsumÚzip)r-   ÚcorrectÚguessedÚcorrect_tagsÚguessed_tagss   &&&  r   ÚscoreÚChunkScore.score�   sÐ   € ð 	�Šœ G¯[©[¸$×:KÑ:KÓLÕL�Ø�Šœ G¯[©[¸$×:KÑ:KÓLÕL�Ø�Š�qÕ�Ø#'ˆÔ ð	-Ü)¨'Ó2ˆLÜ)¨'Ó2ˆLð 	×ÒœC Ó-Õ-ÕØ×Òœcñ "
Ü Ô;ó"
ó 
õ 	
×øô ô 	-ð +-Ð,ˆL™<ð		-ús   ÂC< Ã<DÄDc                ób   € V P                   ^ 8X  d   ^# V P                  V P                   ,          # )z™
Return the overall tag-based accuracy for all text that have
been scored by this ``ChunkScore``, using the IOB (conll2000)
tag encoding.

:rtype: float
)r+   r*   r3   s   &r   r   ÚChunkScore.accuracy¬   s,   € ð ×Ñ˜qÔ ÙØ×!Ñ! D×$4Ñ$4Õ4Ð4r   c                ó”   € V P                  4        V P                  V P                  ,           pV^ 8X  d   ^ # V P                  V,          # )zi
Return the overall precision for all texts that have been
scored by this ``ChunkScore``.

:rtype: float
)r4   r&   r'   ©r-   Údivs   & r   Ú	precisionÚChunkScore.precision¸   ó;   € ð 	×ÑÔØ�l‰l˜TŸ\™\Õ)ˆØ�!Œ8Ùà—<‘< #Õ%Ð%r   c                ó”   € V P                  4        V P                  V P                  ,           pV^ 8X  d   ^ # V P                  V,          # )zf
Return the overall recall for all texts that have been
scored by this ``ChunkScore``.

:rtype: float
©r4   r&   r(   rL   s   & r   ÚrecallÚChunkScore.recallÆ   rP   r   c                óÊ   € V P                  4        V P                  4       pV P                  4       pV^ 8X  g   V^ 8X  d   ^ # ^W,          ^V,
          V,          ,           ,          # )as  
Return the overall F measure for all texts that have been
scored by this ``ChunkScore``.

:param alpha: the relative weighting of precision and recall.
    Larger alpha biases the score towards the precision value,
    while smaller alpha biases the score towards the recall
    value.  ``alpha`` should have a value in the range [0,1].
:type alpha: float
:rtype: float
)r4   rN   rS   )r-   ÚalphaÚpÚrs   &&  r   Ú	f_measureÚChunkScore.f_measureÔ   sQ   € ð 	×ÑÔØ�N‰NÓˆØ�K‰K‹MˆØ�Œ6�Q˜!”VÙØ�E•I  U¥¨a¥Õ/Õ0Ð0r   c                ó†   € V P                  4        \        V P                  4      pV Uu. uF  q"^,          NK  	  up# u upi )z 
Return the chunks which were included in the
correct chunk structures, but not in the guessed chunk
structures, listed in input order.

:rtype: list of chunks
)r4   Úlistr    ©r-   ÚchunksÚcs   &  r   ÚmissedÚChunkScore.missedç   s9   € ð 	×ÑÔÜ�d—h‘h“ˆÙ$Ó%™f˜�!—�™fÑ%Ð%ùÒ%ó   ª>c                ó†   € V P                  4        \        V P                  4      pV Uu. uF  q"^,          NK  	  up# u upi )z 
Return the chunks which were included in the guessed chunk structures,
but not in the correct chunk structures, listed in input order.

:rtype: list of chunks
)r4   r\   r   r]   s   &  r   Ú	incorrectÚChunkScore.incorrectó   s9   € ð 	×ÑÔÜ�d—h‘h“ˆÙ$Ó%™f˜�!—�™fÑ%Ð%ùÒ%rb   c                óf   € \        V P                  4      pV Uu. uF  q"^,          NK  	  up# u upi )zw
Return the chunks which were included in the correct
chunk structures, listed in input order.

:rtype: list of chunks
)r\   r   r]   s   &  r   rC   ÚChunkScore.correctþ   ó.   € ô �d—m‘mÓ$ˆÙ$Ó%™f˜�!—�™fÑ%Ð%ùÒ%ó   š.c                óf   € \        V P                  4      pV Uu. uF  q"^,          NK  	  up# u upi )zw
Return the chunks which were included in the guessed
chunk structures, listed in input order.

:rtype: list of chunks
)r\   r   r]   s   &  r   rD   ÚChunkScore.guessed  rh   ri   c                ó\   € V P                  4        V P                  V P                  ,           # )NrR   r3   s   &r   Ú__len__ÚChunkScore.__len__  s!   € Ø×ÑÔØ�|‰|˜dŸl™lÕ*Ð*r   c                óF   € R\        \        V 4      4      ,           R,           # )zH
Return a concise representation of this ``ChunkScoring``.

:rtype: str
z<ChunkScoring of z chunks>)Úreprr2   r3   s   &r   Ú__repr__ÚChunkScore.__repr__  s   € ð #¤T¬#¨d«)£_Õ4°zÕAÐAr   c                ó  € RRV P                  4       ^d,          R R2,           RV P                  4       ^d,          R R2,           RV P                  4       ^d,          R R2,           RV P                  4       ^d,          R R2,           # )	zý
Return a verbose representation of this ``ChunkScoring``.
This representation includes the precision, recall, and
f-measure scores.  For other information about the score,
use the accessor methods (e.g., ``missed()`` and ``incorrect()``).

:rtype: str
zChunkParse score:
z    IOB Accuracy: z5.1fz%
z    Precision:    z    Recall:       z    F-Measure:    Ú%)r   rN   rS   rY   r3   s   &r   Ú__str__ÚChunkScore.__str__  s’   € ð "Ø" 4§=¡=£?°SÕ#8¸Ð">¸cÐBõCà" 4§>¡>Ó#3°cÕ#9¸$Ð"?¸sÐCõDð # 4§;¡;£=°3Õ#6°tÐ"<¸CÐ@õAð # 4§>¡>Ó#3°cÕ#9¸$Ð"?¸qÐAõ	Bð	
r   )r%   r   r)   r    r(   r   r'   r   r$   r#   r"   r,   r*   r+   r   r&   N)g      à?)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r/   r4   rG   r   rN   rS   rY   r`   rd   rC   rD   rm   rq   ru   Ú__static_attributes__Ú__classdictcell__)Ú__classdict__s   @r   r   r   3   sW   ø‡ € ñ<ò|)ò&-ò
ò:
5ò&ò&ô1ò&
&ò	&ò&ò&ò+òB÷
ð 
r   r   c                 óL  € ^ p. pV  F�  p\        V\        4      '       do   \        P                  ! W%P	                  4       4      '       d#   VP                  W3VP                  4       34       V\        VP                  4       4      ,          pK‡  V^,          pK’  	  \        V4      # )r   )
Ú
isinstancer   ÚreÚmatchÚlabelÚappendÚfreezer2   Úleavesr   )r;   Úcountr   Úposr^   Úchilds   &&&   r   r?   r?   2  s{   € Ø
€CØ€FÛˆÜ�eœT×"Ò"Ü�xŠx˜§[¡[£]×3Ò3Ø—‘ ˜|¨U¯\©\«^Ð<Ô=Ø”3�u—|‘|“~Ó&Õ&ŠCà�1�HŠCñ ô ˆv‹;Ðr   ÚSc                ó<  € \         P                  ! R4      p\        V. 4      .pVP                  V 4       EF3  pVP	                  4       p	V	^ ,          R8X  de   \        V4      ^8w  d   \        RVP                  4       R 24      h\        V. 4      p
VR,          P                  V
4       VP                  V
4       K†  V	^ ,          R8X  d@   \        V4      ^8w  d   \        RVP                  4       R 24      hVP                  4        KÓ  Vf   VR,          P                  V	4       Kñ  \        W“4      w  r¼V'       d   V'       d   \        WEV4      pVR,          P                  W¼34       EK6  	  \        V4      ^8w  d   \        R\        V 4      R 24      hV^ ,          # )	a
  
Divide a string of bracketted tagged text into
chunks and unchunked tokens, and produce a Tree.
Chunks are marked by square brackets (``[...]``).  Words are
delimited by whitespace, and each word should have the form
``text/tag``.  Words that do not contain a slash are
assigned a ``tag`` of None.

:param s: The string to be converted
:type s: str
:param chunk_label: The label to use for chunk nodes
:type chunk_label: str
:param root_label: The label to use for the root of the tree
:type root_label: str
:rtype: Tree
z\[|\]|[^\[\]\s]+Ú[zUnexpected [ at char ÚdÚ]zUnexpected ] at char zExpected ] at char éÿÿÿÿ)r�   Úcompiler   ÚfinditerÚgroupr2   r@   Ústartr„   Úpopr   r   )Úsr   Ú
root_labelÚsepÚsource_tagsetÚtarget_tagsetÚWORD_OR_BRACKETÚstackr‚   ÚtextÚchunkÚwordÚtags   &&&&&&       r   Útagstr2treer    ?  sP  € ô( —j’jÐ!4Ó5€Oä�*˜bÓ!Ð"€EØ ×)Ñ)¨!×,ˆØ�{‰{‹}ˆØ��7�cŒ>Ü�5‹z˜QŒÜ Ð#8¸¿¹»ÀqÐ8IÐ!JÓKÐKÜ˜ bÓ)ˆEØ�"�I×Ñ˜UÔ#Ø�L‰L˜ÖØ�!�W˜Œ^Ü�5‹z˜QŒÜ Ð#8¸¿¹»ÀqÐ8IÐ!JÓKÐKØ�I‰IŽKàŠ{Ø�b•	× Ñ  Ö&ä% dÓ0‘	�ß §]Ü! -ÀÓD�CØ�b•	× Ñ  $ ×-ñ' -ô* ˆ5ƒz�Q„ÜÐ.¬s°1«v°a¨jÐ9Ó:Ð:Ø��8€Or   z(\S+)\s+(\S+)\s+([IOB])-?(\S+)?c                óš  € \        V. 4      .p\        V P                  R4      4       EF  w  rEVP                  4       '       g   K  \        P                  V4      pVf   \        RVR 24      hVP                  4       w  rxršVe	   W¡9  d   Rp	V	R8H  ;'       d    W£R,          P                  4       8g  pV	R9   g	   V'       d!   \        V4      ^8X  d   VP                  4        V	R8X  g	   V'       d6   \        V
. 4      pVR,          P                  V4       VP                  V4       VR,          P                  Wx34       EK  	  V^ ,          # )	aò  
Return a chunk structure for a single sentence
encoded in the given CONLL 2000 style string.
This function converts a CoNLL IOB string into a tree.
It uses the specified chunk types
(defaults to NP, PP and VP), and creates a tree rooted at a node
labeled S (by default).

:param s: The CoNLL string to be converted.
:type s: str
:param chunk_types: The chunk types to be converted.
:type chunk_types: tuple
:param root_label: The node label to use for the root.
:type root_label: str
:rtype: Tree
Ú
zError on line r�   ÚOÚIÚBOÚBr�   )r   Ú	enumerateÚsplitÚstripÚ_LINE_REr‚   r@   Úgroupsrƒ   r2   r”   r„   )r•   Úchunk_typesr–   r›   ÚlinenoÚliner‚   rž   rŸ   ÚstateÚ
chunk_typeÚ
mismatch_Ir�   s   &&&          r   Úconllstr2treer²   u  s  € ô$ �*˜bÓ!Ð"€Eä! !§'¡'¨$£-×0‰ˆØ�z‰z�|Š|Ùô —‘˜tÓ$ˆØŠ=Ü˜~¨f°Q¨ZÐ8Ó9Ð9Ø).¯©«Ñ&ˆ�Eð Ò" zÔ'DØˆEð ˜c‘\×EÐE j¸"µI·O±OÓ4EÑ&Eˆ
Ø�DŒ=ŸJÜ�5‹z˜QŒØ—	‘	”ð �CŒ<Ÿ:Ü˜ RÓ(ˆEØ�"�I×Ñ˜UÔ#Ø�L‰L˜Ôð 	ˆb�	×Ñ˜$˜×%ñ9 1ð< ��8€Or   c                óR  € . pV  Fj  p VP                  4       pRpV FN  p\        V\        4      '       d   \        R4      hVP	                  V^ ,          V^,          WC,           34       RpKP  	  Kl  	  V#   \
         d'    TP	                  T^ ,          T^,          R34        K   i ; i)z³
Return a list of 3-tuples containing ``(word, tag, IOB-tag)``.
Convert a tree to the CoNLL IOB tag format.

:param t: The tree to be converted.
:type t: Tree
:rtype: list(tuple)
úB-z7Tree is too deeply nested to be printed in CoNLL formatúI-r£   )rƒ   r€   r   r@   r„   ÚAttributeError)r;   Útagsr‰   ÚcategoryÚprefixÚcontentss   &     r   r
   r
   ª  s§   € ð €DÛˆð	3Ø—{‘{“}ˆHØˆFÛ!�Ü˜h¬×-Ò-Ü$ØQóð ð —‘˜X a�[¨(°1­+°vÕ7HÐIÔJØ’ó "ñ	 ð €Køô ô 	3Ø�K‰K˜˜q� 5¨¥8¨SÐ1×2ð	3ús   ‰A&A5Á5-B&Â%B&c                óÔ  € \        V. 4      pV  EFT  w  rVpVf(   V'       d   \        R4      hVP                  WV34       K2  VP                  R4      '       d'   VP                  \        VR,          WV3.4      4       Ko  VP                  R4      '       d§   \	        V4      ^ 8X  gA   \        VR,          \         4      '       d$   VR,          P                  4       VR,          8w  d;   V'       d   \        R4      hVP                  \        VR,          WV3.4      4       EK  VR,          P                  WV34       EK,  VR8X  d   VP                  WV34       EKH  \        RV: 24      h	  V# )z)
Convert the CoNLL IOB format to a tree.
zBad conll tag sequencer´   :é   NNrµ   r£   zBad conll tag r�   )r   r@   r„   Ú
startswithr2   r€   rƒ   )Úsentencer¬   r–   ÚstrictÚtreerž   ÚpostagÚchunktags   &&&&    r   Úconlltags2treerÃ   Å  s"  € ô �
˜BÓ€DÜ"*Ñˆ�hØÒßÜ Ð!9Ó:Ð:ð —‘˜T˜NÖ+Ø× Ñ  ×&Ò&Ø�K‰Kœ˜X b�\¨T¨NÐ+;Ó<Ö=Ø× Ñ  ×&Ò&ä�D“	˜Q”Ü! $ r¥(¬D×1Ò1Ø˜•8—>‘>Ó# x°¥|Ô3çÜ$Ð%=Ó>Ð>ð —K‘K¤ X¨b¥\°T°NÐ3CÓ D×Eà�R•—‘  ×/Ø˜Œ_Ø�K‰K˜˜×'ä˜~¨h©\Ð:Ó;Ð;ñ3 #+ð4 €Kr   c                ó€   € \        V 4       Uu. uF  pRP                  V4      NK  	  ppRP                  V4      # u upi )zº
Return a multiline string where each line contains a word, tag and IOB tag.
Convert a tree to the CoNLL IOB string format

:param t: The tree to be converted.
:type t: Tree
:rtype: str
Ú r¢   )r
   Újoin)r;   ÚtokenÚliness   &  r   Útree2conllstrrÉ   é  s;   € ô +9¸Ô*;Ó<Ñ*; ˆS�X‰X�eŽ_Ñ*;€EÐ<Ø�9‰9�UÓÐùò =s   Ž;a   <DOC>\s*(<DOCNO>\s*(?P<docno>.+?)\s*</DOCNO>\s*)?(<DOCTYPE>\s*(?P<doctype>.+?)\s*</DOCTYPE>\s*)?(<DATE_TIME>\s*(?P<date_time>.+?)\s*</DATE_TIME>\s*)?<BODY>\s*(<HEADLINE>\s*(?P<headline>.+?)\s*</HEADLINE>\s*)?<TEXT>(?P<text>.*?)</TEXT>\s*</BODY>\s*</DOC>\s*z#<b_\w+\s+[^>]*?type="(?P<type>\w+)"c                 óÄ  € \        V. 4      .pV f   . # \        P                  ! RV 4       F×  pVP                  4       p VP	                  R4      '       dl   \
        P                  V4      pVf   \        RV4       \        VP                  R4      . 4      pVR
,          P                  V4       VP                  V4       K–  VP	                  R4      '       d   VP                  4        K¿  VR
,          P                  V4       KÙ  	  \        V4      ^8w  d   \        R	4      hV^ ,          #   \        \        3 d%   p\        RTP                  4       R R24      ThR p?ii ; i)Nz<[^>]+>|[^\s<]+z<b_ÚXXXXÚtypez<e_z$Bad IEER string (error at character r�   Ú)zBad IEER stringr�   )r   r�   r‘   r’   r½   Ú_IEER_TYPE_REr‚   Úprintr„   r”   Ú
IndexErrorr@   r“   r2   )r•   r–   r›   Úpiece_mÚpieceÚmr�   Úes   &&      r   Ú_ieer_read_textrÕ     s1  € Ü�*˜bÓ!Ð"€Eð 	‚yØˆ	Ü—;’;Ð1°1Ö5ˆØ—‘“ˆð	Ø×Ñ ×&Ò&Ü!×'Ñ'¨Ó.�Ø’9Ü˜& %Ô(Ü˜QŸW™W V›_¨bÓ1�Ø�b•	× Ñ  Ô'Ø—‘˜UÖ#Ø×!Ñ! %×(Ò(Ø—	‘	–ð
 �b•	× Ñ  Ö'ñ! 6ô* ˆ5ƒz�Q„ÜÐ*Ó+Ð+Ø��8€Oøô œJÐ'ô 	ÜØ6°w·}±}³ÀqÐ6IÈÐKóàðûð	ús*   ¿B D*ÃD*ÃD*Ã*D*Ä*EÄ;EÅEc                ó(  € \         P                  V 4      pV'       dl   R\        VP                  R4      V4      RVP                  R4      RVP                  R4      RVP                  R4      R\        VP                  R4      V4      /# \        W4      # )aP  
Return a chunk structure containing the chunked tagged text that is
encoded in the given IEER style string.
Convert a string of chunked tagged text in the IEER named
entity format into a chunk structure.  Chunks are of several
types, LOCATION, ORGANIZATION, PERSON, DURATION, DATE, CARDINAL,
PERCENT, MONEY, and MEASURE.

:rtype: Tree
rœ   ÚdocnoÚdoctypeÚ	date_timeÚheadline)Ú_IEER_DOC_REr‚   rÕ   r’   )r•   r¬   r–   rÓ   s   &&& r   Úieerstr2treerÜ   '  sƒ   € ô8 	×Ñ˜1Ó€Aßà”O A§G¡G¨F£O°ZÓ@Ø�Q—W‘W˜WÓ%Ø�q—w‘w˜yÓ)Ø˜Ÿ™ Ó-ð œ¨¯©°
Ó(;¸ZÓHð
ð 	
ô ˜qÓ-Ð-r   c                  ó0  € R p ^ RI pVP                  P                  V RR7      pVP                  4        \	        4        Rp \        V RR7      pVP                  4        \	        R4       \	        VP                  P                  V4      4       \	        4        R# )zd[ Pierre/NNP Vinken/NNP ] ,/, [ 61/CD years/NNS ] old/JJ ,/, will/MD join/VB [ the/DT board/NN ] ./.NÚNP)r   av  
These DT B-NP
research NN I-NP
protocols NNS I-NP
offer VBP B-VP
to TO B-PP
the DT B-NP
patient NN I-NP
not RB O
only RB O
the DT B-NP
very RB I-NP
best JJS I-NP
therapy NN I-NP
which WDT B-NP
we PRP B-NP
have VBP B-VP
established VBN I-VP
today NN B-NP
but CC B-NP
also RB I-NP
the DT B-NP
hope NN I-NP
of IN B-PP
something NN B-NP
still RB B-ADJP
better JJR I-ADJP
. . O
)r¬   zCoNLL output:)rÞ   ÚPP)Únltkr�   r    ÚpprintrÏ   r²   rÉ   )r•   rà   r;   Ú
conll_trees       r   Údemorã   R  sx   € Øn€AÛà�
‰
×Ñ˜q¨dÐÓ3€AØ‡H�H„JÜ	„Gð	€Aô< ˜q¨lÔ;€JØ×ÑÔô 
ˆ/ÔÜ	ˆ$�*‰*×
"Ñ
" :Ó
.Ô/Ü	†Gr   Ú__main__)rÞ   rŠ   Ú/NN)©rÞ   rß   ÚVPrŠ   )ræ   rŠ   F)	ÚLOCATIONÚORGANIZATIONÚPERSONÚDURATIONÚDATEÚCARDINALÚPERCENTÚMONEYÚMEASURE)r�   Únltk.metricsr   r   Únltk.tag.mappingr   Únltk.tag.utilr   Ú	nltk.treer   r   r?   r    r�   rª   r²   r
   rÃ   rÉ   ÚDOTALLrÛ   rÎ   rÕ   rÜ   rã   rw   r9   r   r   Ú<module>rö      s¹   ðó 
å .Ý $Ý #Ý ò+÷<z
ñ z
ò~
ô.ðf �:Š:Ð8Ó9€ô2òjô6!òH
ð �zŠzðð ‡I�Ió
€ð —
’
ÐAÓB€òòD
ð ô(.òV,ð^ ˆzÔÙ†Fñ r   