+
    ÖÇÜhÖT  ã                   ó¤   € R t ^ RIt^ RI5 ^ RI5 ^ RIHt ^ RIHt ^ RIH	t	H
t
  ! R R]4      t ! R R	4      t ! R
 R]4      t ! R R]4      tR# )z!
Read CoNLL-style chunk fileids.
N)Ú*)Úmap_tag)ÚTree)ÚLazyConcatenationÚLazyMapc                   ó:  a € ] tR t^t o RtRtRtRtRtRt	Rt
Rt]]]]]	]
]3tR	R
RRR]R	R	3R ltR&R ltR&R ltR'R ltR'R ltR(R ltR(R ltR(R ltR&R ltR)R ltR'R ltR'R ltR&R ltR tR tR&R ltR&R ltR&R ltR&R  lt R! t!R" t"R# t#]$R$ 4       t%R%t&V t'R	# )*ÚConllCorpusReadera„  
A corpus reader for CoNLL-style files.  These files consist of a
series of sentences, separated by blank lines.  Each sentence is
encoded using a table (or "grid") of values, where each line
corresponds to a single word, and each column corresponds to an
annotation type.  The set of columns used by CoNLL-style files can
vary from corpus to corpus; the ``ConllCorpusReader`` constructor
therefore takes an argument, ``columntypes``, which is used to
specify the columns that are used by a given corpus. By default
columns are split by consecutive whitespaces, with the
``separator`` argument you can set a string to split by (e.g.
``' '``).


@todo: Add support for reading from corpora where different
    parallel files contain different columns.
@todo: Possibly add caching of the grid corpus view?  This would
    allow the same grid view to be used by different data access
    methods (eg words() and parsed_sents() could both share the
    same grid corpus view object).
@todo: Better support for -DOCSTART-.  Currently, we just ignore
    it, but it could be used to define methods that retrieve a
    document at a time (eg parsed_documents()).
ÚwordsÚposÚtreeÚchunkÚneÚsrlÚignoreNÚSFTÚutf8c                ób  € V F%  pWÀP                   9  g   K  \        R V,          4      h	  \        V\        4      '       d   V.pW@n        \        V4       UUu/ uF  w  rÞWíbK	  	  uppV n        W`n        WPn        Wpn	        W�n
        \        P                  WW(4       W n        W°n        R# u uppi )zBad column type %rN)ÚCOLUMN_TYPESÚ
ValueErrorÚ
isinstanceÚstrÚ_chunk_typesÚ	enumerateÚ_colmapÚ_pos_in_treeÚ_root_labelÚ_srl_includes_rolesetÚ_tree_classÚCorpusReaderÚ__init__Ú_tagsetÚsep)ÚselfÚrootÚfileidsÚcolumntypesÚchunk_typesÚ
root_labelÚpos_in_treeÚsrl_includes_rolesetÚencodingÚ
tree_classÚtagsetÚ	separatorÚ
columntypeÚiÚcs   &&&&&&&&&&&&   Ú:/usr/lib/python3/dist-packages/nltk/corpus/reader/conll.pyr   ÚConllCorpusReader.__init__C   s    € ó &ˆJØ×!2Ñ!2Ö2Ü Ð!5¸
Õ!BÓCÐCñ &ô �k¤3×'Ò'Ø&˜-ˆKØ'ÔÜ+4°[Ô+AÔBÑ+A¡ !˜šÑ+AÒBˆŒØ'ÔØ%ÔØ%9Ô"Ø%ÔÜ×Ñ˜d¨'Ô<ØŒØŽùó Cs   ÁB+c                ó”   € V P                  V P                  4       \        \        V P                  V P                  V4      4      4      # ©N)Ú_requireÚWORDSr   r   Ú
_get_wordsÚ_grids©r"   r$   s   &&r1   r	   ÚConllCorpusReader.wordsd   s1   € Ø�‰�d—j‘jÔ!Ü ¤¨¯©¸$¿+¹+ÀgÓ:NÓ!OÓPÐPó    c                ó‚   € V P                  V P                  4       \        V P                  V P	                  V4      4      # r4   )r5   r6   r   r7   r8   r9   s   &&r1   ÚsentsÚConllCorpusReader.sentsh   s,   € Ø�‰�d—j‘jÔ!Ü�t—‘¨¯©°GÓ(<Ó=Ð=r;   c                ó¨   a a€ S P                  S P                  S P                  4       V V3R  lp\        \	        VS P                  V4      4      4      # )c                 ó(   <€ SP                  V S4      # r4   ©Ú_get_tagged_words©Úgridr"   r,   s   &€€r1   Úget_tagged_wordsÚ8ConllCorpusReader.tagged_words.<locals>.get_tagged_wordso   ó   ø€ Ø×)Ñ)¨$°Ó7Ð7r;   )r5   r6   ÚPOSr   r   r8   ©r"   r$   r,   rE   s   f&f r1   Útagged_wordsÚConllCorpusReader.tagged_wordsl   s<   ù€ Ø�‰�d—j‘j $§(¡(Ô+ö	8ô !¤Ð)9¸4¿;¹;ÀwÓ;OÓ!PÓQÐQr;   c                ó–   a a€ S P                  S P                  S P                  4       V V3R  lp\        VS P	                  V4      4      # )c                 ó(   <€ SP                  V S4      # r4   rA   rC   s   &€€r1   rE   Ú8ConllCorpusReader.tagged_sents.<locals>.get_tagged_wordsw   rG   r;   )r5   r6   rH   r   r8   rI   s   f&f r1   Útagged_sentsÚConllCorpusReader.tagged_sentst   s7   ù€ Ø�‰�d—j‘j $§(¡(Ô+ö	8ô Ð'¨¯©°WÓ)=Ó>Ð>r;   c                óâ   a aa€ S P                  S P                  S P                  S P                  4       Sf   S P                  oVV V3R lp\        \        VS P                  V4      4      4      # )Nc                 ó*   <€ SP                  V SS4      # r4   ©Ú_get_chunked_words©rD   r&   r"   r,   s   &€€€r1   Úget_chunked_wordsÚ:ConllCorpusReader.chunked_words.<locals>.get_chunked_words�   ó   ø€ Ø×*Ñ*¨4°¸fÓEÐEr;   )r5   r6   rH   ÚCHUNKr   r   r   r8   ©r"   r$   r&   r,   rV   s   f&ff r1   Úchunked_wordsÚConllCorpusReader.chunked_words|   sT   ú€ Ø�‰�d—j‘j $§(¡(¨D¯J©JÔ7ØÒØ×+Ñ+ˆK÷	Fô !¤Ð):¸D¿K¹KÈÓ<PÓ!QÓRÐRr;   c                óÐ   a aa€ S P                  S P                  S P                  S P                  4       Sf   S P                  oVV V3R lp\        VS P                  V4      4      # )Nc                 ó*   <€ SP                  V SS4      # r4   rS   rU   s   &€€€r1   rV   Ú:ConllCorpusReader.chunked_sents.<locals>.get_chunked_words‹   rX   r;   )r5   r6   rH   rY   r   r   r8   rZ   s   f&ff r1   Úchunked_sentsÚConllCorpusReader.chunked_sents†   sO   ú€ Ø�‰�d—j‘j $§(¡(¨D¯J©JÔ7ØÒØ×+Ñ+ˆK÷	Fô Ð(¨$¯+©+°gÓ*>Ó?Ð?r;   c                óÐ   a aa€ S P                  S P                  S P                  S P                  4       Sf   S P                  oVV V3R lp\        VS P                  V4      4      # )Nc                 ó*   <€ SP                  V SS4      # r4   )Ú_get_parsed_sent)rD   r(   r"   r,   s   &€€€r1   Úget_parsed_sentÚ7ConllCorpusReader.parsed_sents.<locals>.get_parsed_sent•   s   ø€ Ø×(Ñ(¨¨{¸FÓCÐCr;   )r5   r6   rH   ÚTREEr   r   r8   )r"   r$   r(   r,   re   s   f&ff r1   Úparsed_sentsÚConllCorpusReader.parsed_sents�   sN   ú€ Ø�‰�d—j‘j $§(¡(¨D¯I©IÔ6ØÒØ×+Ñ+ˆK÷	Dô �¨¯©°GÓ(<Ó=Ð=r;   c                ó‚   € V P                  V P                  4       \        V P                  V P	                  V4      4      # r4   )r5   ÚSRLr   Ú_get_srl_spansr8   r9   s   &&r1   Ú	srl_spansÚConllCorpusReader.srl_spansš   s.   € Ø�‰�d—h‘hÔÜ�t×*Ñ*¨D¯K©K¸Ó,@ÓAÐAr;   c                ó  a a€ S P                  S P                  S P                  S P                  S P                  4       Sf   S P
                  oVV 3R lp\        VS P                  V4      4      pV'       d   \        V4      pV# )Nc                 ó(   <€ SP                  V S4      # r4   )Ú_get_srl_instances)rD   r(   r"   s   &€€r1   Úget_srl_instancesÚ:ConllCorpusReader.srl_instances.<locals>.get_srl_instances£   s   ø€ Ø×*Ñ*¨4°Ó=Ð=r;   )	r5   r6   rH   rg   rk   r   r   r8   r   )r"   r$   r(   Úflattenrr   Úresults   f&f&  r1   Úsrl_instancesÚConllCorpusReader.srl_instancesž   se   ù€ Ø�‰�d—j‘j $§(¡(¨D¯I©I°t·x±xÔ@ØÒØ×+Ñ+ˆKö	>ô Ð*¨D¯K©K¸Ó,@ÓAˆßÜ& vÓ.ˆFØˆr;   c                ó¾   a a€ S P                  S P                  S P                  S P                  4       V V3R lp\	        \        VS P                  V4      4      4      # )zœ
:return: a list of word/tag/IOB tuples
:rtype: list(tuple)
:param fileids: the list of fileids that make up this corpus
:type fileids: None or str or list
c                 ó(   <€ SP                  V S4      # r4   ©Ú_get_iob_wordsrC   s   &€€r1   Úget_iob_wordsÚ2ConllCorpusReader.iob_words.<locals>.get_iob_words´   ó   ø€ Ø×&Ñ& t¨VÓ4Ð4r;   )r5   r6   rH   rY   r   r   r8   ©r"   r$   r,   r|   s   f&f r1   Ú	iob_wordsÚConllCorpusReader.iob_words«   sC   ù€ ð 	�‰�d—j‘j $§(¡(¨D¯J©JÔ7ö	5ô !¤¨¸¿¹ÀGÓ8LÓ!MÓNÐNr;   c                ó¬   a a€ S P                  S P                  S P                  S P                  4       V V3R lp\	        VS P                  V4      4      # )z¤
:return: a list of lists of word/tag/IOB tuples
:rtype: list(list)
:param fileids: the list of fileids that make up this corpus
:type fileids: None or str or list
c                 ó(   <€ SP                  V S4      # r4   rz   rC   s   &€€r1   r|   Ú2ConllCorpusReader.iob_sents.<locals>.get_iob_wordsÂ   r~   r;   )r5   r6   rH   rY   r   r8   r   s   f&f r1   Ú	iob_sentsÚConllCorpusReader.iob_sents¹   s>   ù€ ð 	�‰�d—j‘j $§(¡(¨D¯J©JÔ7ö	5ô �} d§k¡k°'Ó&:Ó;Ð;r;   c                ó–   € \        V P                  VR 4       UUu. uF  w  r#\        W P                  VR7      NK  	  upp4      # u uppi )T)r*   )ÚconcatÚabspathsÚStreamBackedCorpusViewÚ_read_grid_block)r"   r$   ÚfileidÚencs   &&  r1   r8   ÚConllCorpusReader._gridsË   sM   € ô ð &*§]¡]°7¸DÔ%Aôá%A‘M�Vô ' v×/DÑ/DÈs×SÙ%Aòó
ð 	
ùós   ›"A
c                óØ  € . p\        V4       FÓ  pVP                  4       pV'       g   K  VP                  R 4       Uu. uF  qDP                  V P                  4      NK  	  ppV^ ,          V P                  P                  R^ 4      ,          R8X  d   V^  V F5  p\        V4      \        V^ ,          4      8w  g   K%  \        RV,          4      h	  VP                  V4       KÕ  	  V# u upi )Ú
r	   z
-DOCSTART-z"Inconsistent number of columns:
%s)	Úread_blankline_blockÚstripÚsplitr!   r   ÚgetÚlenr   Úappend)r"   ÚstreamÚgridsÚblockÚlinerD   Úrows   &&     r1   r‹   Ú"ConllCorpusReader._read_grid_blockÖ   sÈ   € ØˆÜ)¨&Ö1ˆEØ—K‘K“MˆEßÙà5:·[±[ÀÔ5FÓGÑ5F¨T—J‘J˜tŸx™xÖ(Ñ5FˆDÐGð �A�w�t—|‘|×'Ñ'¨°Ó3Õ4¸ÔDØ˜�Gó �Ü�s“8œs 4¨¥7›|Ö+Ü$Ð%JÈUÕ%RÓSÐSñ ð �L‰L˜Öñ! 2ð" ˆùò Hs   ¾#C'c                óF   € V P                  WP                  R ,          4      # ©r	   )Ú_get_columnr   )r"   rD   s   &&r1   r7   ÚConllCorpusReader._get_wordsñ   s   € Ø×Ñ §l¡l°7Õ&;Ó<Ð<r;   c           	     ó4  € V P                  WP                  R ,          4      pV'       d6   W P                  8w  d&   V Uu. uF  p\        V P                  W$4      NK  	  pp\	        \        V P                  WP                  R,          4      V4      4      # u upi )r
   r	   ©rŸ   r   r    r   ÚlistÚzip©r"   rD   r,   Úpos_tagsÚts   &&&  r1   rB   Ú#ConllCorpusReader._get_tagged_wordsô   sr   € Ø×#Ñ# D¯,©,°uÕ*=Ó>ˆß�f§¡Ô,ÙBJÓKÁ(¸Qœ §¡¨fÖ8Á(ˆHÐKÜ”C˜×(Ñ(¨¯|©|¸GÕ/DÓEÀxÓPÓQÐQùò Ls   ¿Bc                óv  € V P                  WP                  R ,          4      pV'       d6   W P                  8w  d&   V Uu. uF  p\        V P                  W$4      NK  	  pp\	        \        V P                  WP                  R,          4      VV P                  WP                  R,          4      4      4      # u upi )r
   r	   r   r¢   r¥   s   &&&  r1   r{   Ú ConllCorpusReader._get_iob_wordsú   s’   € Ø×#Ñ# D¯,©,°uÕ*=Ó>ˆß�f§¡Ô,ÙBJÓKÁ(¸Qœ §¡¨fÖ8Á(ˆHÐKÜÜØ× Ñ  §|¡|°GÕ'<Ó=ØØ× Ñ  §|¡|°GÕ'<Ó=óó
ð 	
ùò Ls   ¿B6c                óR  € V P                  WP                  R ,          4      pV P                  WP                  R,          4      pV'       d6   W0P                  8w  d&   V Uu. uF  p\        V P                  W64      NK  	  ppV P                  WP                  R,          4      p\	        V P
                  . 4      .p\        WEV4       FÐ  w  ršpVR8X  d   RRrÜMVP                  R4      w  rÍVe	   WÒ9  d   RpVR8X  d   WØR	,          P                  4       8w  d   RpVR9   d!   \        V4      ^8X  d   VP                  4        VR8X  d6   \	        V. 4      pVR	,          P                  V4       VP                  V4       VR	,          P                  Wš34       KÒ  	  V^ ,          # u upi )
r	   r
   r   ÚOÚ Ú-ÚIÚBÚBOéÿÿÿÿ)rŸ   r   r    r   r   r   r¤   r“   Úlabelr•   Úpopr–   )r"   rD   r&   r,   r	   r¦   r§   Ú
chunk_tagsÚstackÚwordÚpos_tagÚ	chunk_tagÚstateÚ
chunk_typeÚ	new_chunks   &&&&           r1   rT   Ú$ConllCorpusReader._get_chunked_words  s`  € à× Ñ  §|¡|°GÕ'<Ó=ˆØ×#Ñ# D¯,©,°uÕ*=Ó>ˆß�f§¡Ô,ÙBJÓKÁ(¸Qœ §¡¨fÖ8Á(ˆHÐKØ×%Ñ% d¯L©L¸Õ,AÓBˆ
ä�d×&Ñ&¨Ó+Ð,ˆä(+¨E¸ZÖ(HÑ$ˆD˜9Ø˜CÔØ$'¨‘zà&/§o¡o°cÓ&:Ñ#�àÒ&¨:Ô+HØ�à˜Œ| 
°B­i¯o©oÓ.?Ô ?Ø�à˜Œ}¤ U£¨q¤Ø—	‘	”à˜Œ|Ü  ¨RÓ0�	Ø�b•	× Ñ  Ô+Ø—‘˜YÔ'à�"�I×Ñ˜d˜_Ö-ñ) )Ið, �Q�xˆùò7 Ls   Á!F$c           	     ó:  € V P                  WP                  R ,          4      pV P                  WP                  R,          4      pV'       d6   W0P                  8w  d&   V Uu. uF  p\        V P                  W64      NK  	  ppV P                  WP                  R,          4      pRp\	        WEV4       Fh  w  ršpV	R8X  d   Rp	V	R8X  d   Rp	V
R8X  d   Rp
V
R8X  d   Rp
VP                  R4      w  rÍVP                  R4      R,          pWŒ R	V
 R
V	 RV 2,          pKj  	   V P                  P                  V4      pV'       g’   VP                  4        F}  p\        V4       Fk  w  pp\        V\        4      '       g   K  \!        V4      ^8X  g   K0  \        V^ ,          \"        4      '       g   KO  V^ ,          VP%                  4       3VV&   Km  	  K  	  V# u upi   \        \        3 d0    T P                  P                  RT P                   R
T R24      p Lßi ; i)r	   r
   r   r­   Ú(z-LRB-Ú)z-RRB-r   z (Ú z) )rŸ   r   r    r   r¤   r“   Úcountr   Ú
fromstringr   Ú
IndexErrorr   Úsubtreesr   r   r   r•   r   r³   )r"   rD   r(   r,   r	   r¦   r§   Ú
parse_tagsÚtreestrr·   r¸   Ú	parse_tagÚleftÚrightr   Úsubtreer/   Úchilds   &&&&              r1   rd   Ú"ConllCorpusReader._get_parsed_sent(  sÜ  € Ø× Ñ  §|¡|°GÕ'<Ó=ˆØ×#Ñ# D¯,©,°uÕ*=Ó>ˆß�f§¡Ô,ÙBJÓKÁ(¸Qœ §¡¨fÖ8Á(ˆHÐKØ×%Ñ% d¯L©L¸Õ,@ÓAˆ
àˆÜ(+¨E¸ZÖ(HÑ$ˆD˜9Ø�sŒ{Ø�Ø�sŒ{Ø�Ø˜#Œ~Ø!�Ø˜#Œ~Ø!�Ø%ŸO™O¨CÓ0‰MˆTØ—K‘K Ó$ sÕ*ˆEØ˜˜r ' ¨!¨D¨6°°E°7Ð;Õ;ŠGñ )Ið	RØ×#Ñ#×.Ñ.¨wÓ7ˆD÷ ØŸ=™=ž?�Ü )¨'Ö 2‘H�A�uä" 5¬$×/Ô/Ü ›J¨!žOÜ& u¨Q¥x´×5Ô5à&+¨A¥h°·±³Ð%>˜ ›
ó !3ñ +ð ˆùò? Løô$ œJÐ'ô 	RØ×#Ñ#×.Ñ.°°4×3CÑ3CÐ2DÀAÀgÀYÈaÐ/PÓQŠDð	Rús   Á!GÄG Ç=HÈHc                óR  € V P                   '       dE   V P                  WP                  R,          ^,           4      pV P                  R,          ^,           pM<V P                  WP                  R,          4      pV P                  R,          ^,           p\        V Uu. uF  qDR8w  g   K  VNK  	  up4      p. p\	        V4       FÛ  pV P                  WV,           4      p. p	. p
\        V4       Fœ  w  r¼VP                  R4      w  rÞVP                  R4       F  pV'       g   K  V
P                  Wû34       K!  	  \	        VP                  R4      4       F2  pV
P                  4       w  ppV	P                  VV^,           3V34       K4  	  Kž  	  VP                  V	4       KÝ  	  V# u upi )z+
list of list of (start, end), tag) tuples
r   r®   r   r¿   rÀ   )
r   rŸ   r   r•   Úranger   r“   r–   rÂ   r´   )r"   rD   Ú
predicatesÚ	start_colÚpÚ	num_predsÚ	spanlistsr/   ÚcolÚspanlistr¶   ÚwordnumÚsrl_tagrÉ   rÊ   ÚtagÚstarts   &&               r1   rl   Ú ConllCorpusReader._get_srl_spansM  sf  € ð ×%×%Ð%Ø×)Ñ)¨$·±¸UÕ0CÀaÕ0GÓHˆJØŸ™ UÕ+¨aÕ/‰Ià×)Ñ)¨$·±¸UÕ0CÓDˆJØŸ™ UÕ+¨aÕ/ˆIô ¡JÓ;¡J˜q°s±(Ÿ˜¡JÑ;Ó<ˆ	àˆ	Ü�yÖ!ˆAØ×"Ñ" 4°Q­Ó7ˆCØˆHØˆEÜ$-¨c¦NÑ �Ø '§¡¨cÓ 2‘�ØŸ:™: cž?�Cß‘sØŸ™ c ^Ö4ñ +ô ˜uŸ{™{¨3Ó/Ö0�AØ#(§9¡9£;‘L�S˜%Ø—O‘O e¨W°q­[Ð%9¸3Ð$?Ö@ó 1ñ %3ð ×Ñ˜XÖ&ñ "ð Ðùò# <s   ÂF$Â)F$c           
     ó’  € V P                  W4      pV P                  V4      pV P                  '       dM   V P                  WP                  R ,          ^,           4      pV P                  WP                  R ,          4      pM5V P                  WP                  R ,          4      pR.\        V4      ,          p\        V4      p\        V4       Fw  w  r‰V	R8X  d   K  V F.  p
V
 F#  w  w  r¼pV\        W¼4      9   g   K  VR9   g   K#   M	  K.   M	  \        RV	,          4      hVP                  \        W8W–V,          V
4      4       Ky  	  V# )r   Nr®   zNo srl column found for %r©ÚVzC-V)rd   rl   r   rŸ   r   r•   ÚConllSRLInstanceListr   rÏ   r   r–   ÚConllSRLInstance)r"   rD   r(   r   rÔ   rÐ   ÚrolesetsÚ	instancesr×   Ú	predicaterÖ   rÚ   ÚendrÙ   s   &&&           r1   rq   Ú$ConllCorpusReader._get_srl_instancesm  s+  € Ø×$Ñ$ TÓ7ˆØ×'Ñ'¨Ó-ˆ	Ø×%×%Ð%Ø×)Ñ)¨$·±¸UÕ0CÀaÕ0GÓHˆJØ×'Ñ'¨¯l©l¸5Õ.AÓB‰Hà×)Ñ)¨$·±¸UÕ0CÓDˆJØ�v¤ J£Õ/ˆHä(¨Ó.ˆ	Ü"+¨JÖ"7ÑˆGØ˜CÔÙó &�Û)1Ñ%‘L�U #Ø¤%¨Ó"3Ö3¸¸|Ö8KÙñ *2ñ Ùñ &ô !Ð!=À	Õ!IÓJÐJØ×ÑÜ  °	ÀGÕ;LÈhÓWöñ #8ð& Ðr;   c                ó\   € V F%  pW P                   9  g   K  \        R V,          4      h	  R# )z)This corpus does not contain a %s column.N)r   r   )r"   r%   r.   s   &* r1   r5   ÚConllCorpusReader._require‘  s+   € Û%ˆJØ§¡Ö-Ü ØBÀZÕOóð ó &r;   c                ón   € \        \        V 4      4       Uu. uF  q V,          V,          NK  	  up# u upi r4   )rÏ   r•   )rD   Úcolumn_indexr/   s   && r1   rŸ   ÚConllCorpusReader._get_column˜  s/   € ä/4´S¸³YÔ/?Ó@Ñ/?¨!�Q•˜×%Ð%Ñ/?Ñ@Ð@ùÒ@s   —2)r   r   r   r   r   r    r   r!   r4   )NN)NNN)NNT)(Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r6   rH   rg   rY   ÚNErk   ÚIGNOREr   r   r   r	   r=   rJ   rO   r[   r`   rh   rm   rv   r€   r…   r8   r‹   r7   rB   r{   rT   rd   rl   rq   r5   ÚstaticmethodrŸ   Ú__static_attributes__Ú__classdictcell__©Ú__classdict__s   @r1   r   r      sï   ø‡ € ñð: €EØ
€CØ€DØ€EØ	€BØ
€CØ€Fð ˜3  e¨R°°fÐ=€Lð ØØØ!ØØØØôôBQô>ôRô?ôSô@ô>ôBôôOô<ô$	
òò6=ôRô

ô ôD#òJò@òHð ñAó öAr;   r   c                   ó6   a € ] tR tRt o RtR tR tR tRtV t	R# )rà   i�  zp
An SRL instance from a CoNLL corpus, which identifies and
providing labels for the arguments of a single verb.
c           	     óT  € . V n          W n         W0n        W@n        . V n         WPn         Wn         VP                  4       V n         V FZ  w  w  rgpVR9   d.   V ;P                   \        \        Wg4      4      ,          un         K<  V P                  P                  Wg3V34       K\  	  R# )rÞ   NrÝ   )ÚverbÚ	verb_headÚ	verb_stemÚrolesetÚ	argumentsÚtagged_spansr   Úleavesr	   r£   rÏ   r–   )	r"   r   rú   rû   rü   rþ   rÚ   rä   rÙ   s	   &&&&&&   r1   r   ÚConllSRLInstance.__init__¥  s¨   € ØˆŒ	ð	/ð
 #Œð	"ð
 #ŒàŒàˆŒð	Fð
 )Ôð	*ð Œ	ØGà—[‘[“]ˆŒ
ð	ó ".Ñ‰LˆU˜#Ø�lÔ"Ø—	’	œT¤%¨Ó"3Ó4Õ4—	à—‘×%Ñ%¨ |°SÐ&9Ö:ó	 ".r;   c                ó�   € \        V P                  4      ^8w  d   RMRpRV P                  \        V P                  4      V3,          # )é   Úsr­   z,<ConllSRLInstance for %r with %d argument%s>)r•   rý   rû   )r"   Úplurals   & r1   Ú__repr__ÚConllSRLInstance.__repr__Ï  s?   € ô ˜DŸN™NÓ+¨qÔ0‘°bˆØ=Ø�^‰^œS §¡Ó0°&Ð9õ
ð 	
r;   c                ó&  a € R P                  V 3R lS P                   4       4      pRV: RS P                  : R2pRp\        S P                  4       FŒ  w  rE\        V\        4      '       d
   V^ ,          pS P                   F/  w  w  rgpWF8X  d   VRV,          ,          pWG8X  g   K&  VR,          pK1  	  VS P                  9   d
   RV,          pW5R ,           ,          pKŽ  	  V\        P                  ! VP                  R	R
4      RRR7      ,           # )rÁ   c              3   óX   <"  € T F  pSP                   V,          ^ ,          x € K!  	  R# 5i)é    Nrž   )Ú.0r/   r"   s   & €r1   Ú	<genexpr>Ú*ConllSRLInstance.pprint.<locals>.<genexpr>Ø  s!   øé € Ð?±Y°˜4Ÿ:™: a�=¨×+Ò+³Yùs   ƒ'*zSRL for z (stem=z):
r­   z[%s z] z<<%s>>z ]Ú]z    )Úinitial_indentÚsubsequent_indent)Újoinrù   rû   r   r	   r   Útuplerý   ÚtextwrapÚfillÚreplace)	r"   ÚverbstrÚhdrr  r/   r·   rÚ   rä   Úargids	   f        r1   ÚpprintÚConllSRLInstance.pprint×  sç   ø€ Ø—(‘(Ô?°T·Y²YÓ?Ó?ˆØ˜™ 7¨4¯>©>Ñ*<¸DÐAˆØˆÜ  §¡Ö,‰GˆAÜ˜$¤×&Ò&Ø˜A•w�Ø'+§~¤~Ñ#‘�˜eØ”:Ø˜ %�Õ'�AØ–8Ø˜•I’Añ	 (6ð
 �D—I‘IŒ~Ø $•�Ø˜•�OŠAñ -ð ”X—]’]Ø�I‰I�d˜CÓ °È6ô
õ 
ð 	
r;   )rý   rü   rþ   r   rù   rú   rû   r	   N)
rë   rì   rí   rî   rï   r   r  r  ró   rô   rõ   s   @r1   rà   rà   �  s   ø‡ € ñò(;òT
÷
ð 
r;   rà   c                   óD   a € ] tR tRt o RtR	R ltR tR
R ltR tRt	V t
R# )rß   ië  z(
Set of instances for a single sentence
c                ó<   € Wn         \        P                  W4       R # r4   )r   r£   r   )r"   r   râ   s   &&&r1   r   ÚConllSRLInstanceList.__init__ð  s   € ØŒ	Ü�‰�dÖ&r;   c                ó"   € V P                  4       # r4   )r  )r"   s   &r1   Ú__str__ÚConllSRLInstanceList.__str__ô  s   € Ø�{‰{‹}Ðr;   c                ó‚  € V  F)  pVP                   V P                   8w  g   K   \        R 4      h	  V'       d_   V P                   P                  4       pR.\        V4      ,          pR.\        V4      ,          pV P	                  V P                   ^ W4V4       Rp\        \        X4      4       EF  pV'       d]   VRW7,          ,          ,          pVRXV,          ,          ,          pVR\        XV,          P                  R4      4      ,          ,          pV  F/  pWrP                  8X  g   K  VRVP                  ,          ,          p M	  VRR,          ,          pV  FR  pRpVP                   F-  w  w  ršpWy8X  d   RV V 2pWz^,
          8X  g   K$  VR	,          pK/  	  VR
V,          ,          pKT  	  VR,          pEK  	  V# )zTree mismatch!Nr   r­   z%-20s z%-8s z
%15s*%-8s r®   r¿   rÀ   z%-12s r�   )r   r   rÿ   r•   Ú_tree2conllrÏ   r  r“   rú   rû   rþ   )r"   Úinclude_treeÚinstr	   r
   Úsyntr  r/   ÚargstrrÚ   rä   r  s   &&          r1   r  ÚConllSRLInstanceList.pprint÷  sƒ  € ãˆDØ�y‰y˜DŸI™IÖ%Ü Ð!1Ó2Ð2ñ ÷
 Ø—I‘I×$Ñ$Ó&ˆEØ�&œ3˜u›:Õ%ˆCØ�5œ3˜u›:Õ%ˆDØ×Ñ˜TŸY™Y¨¨5°tÔ<àˆÜ”s˜5“z×"ˆAçØ�X ¥Õ(Õ(�Ø�W˜s 1�vÕ%Õ%�Ø�\¤E¨$¨q­'¯-©-¸Ó*<Ó$=Õ=Õ=�ó �ØŸ™Ö&Ø˜ D§N¡NÕ2Õ2�AÙñ ð
 �X •^Õ#�ã�Ø�Ø+/×+<Ô+<Ñ'‘L�U %Ø”zØ#$ U G¨F¨8Ð!4˜Ø 1�W–~Ø #�šñ	 ,=ð
 �X Õ&Õ&’ñ ð ��I‹Añ/ #ð0 ˆr;   c                óX  € \        V\        4      '       g   Q h\        V4      ^8X  dO   \        V^ ,          \        4      '       d2   VP	                  4       WB&   W2,          V^ ,          8X  g   Q hV^,           # \        V4      ^8X  dP   \        V^ ,          \
        4      '       d3   \        V^ ,          4      ^8X  g   Q hV^ ,          w  WB&   WB&   V^,           # RVP	                  4        WR,           2WR&   V F  pV P                  WbW4V4      pK  	  WR^,
          ;;,          R,          uu&   V# )r  r¿   rÀ   )r   r   r•   r   r³   r  r!  )r"   r   r×   r	   r
   r$  rÌ   s   &&&&&& r1   r!  Ú ConllSRLInstanceList._tree2conll  s÷   € Ü˜$¤×%Ò%Ð%Ð%Üˆt‹9˜Œ>œj¨¨a­´#×6Ò6ØŸ:™:›<ˆC‰LØ•> T¨!¥WÔ,Ð,Ð,Ø˜Q•;ÐÜ�‹Y˜!Œ^¤
¨4°­7´E× :Ò :Ü�t˜A•w“< 1Ô$Ð$Ð$Ø)-¨a­Ñ&ˆC‰L˜#™,Ø˜Q•;Ðà §
¡
£˜~¨d­m¨_Ð=ˆD‰MÛ�Ø×*Ñ*¨5¸5ÀtÓL’ñ à˜1•× Õ$ÓØˆNr;   )r   N)© )F)rë   rì   rí   rî   rï   r   r  r  r!  ró   rô   rõ   s   @r1   rß   rß   ë  s$   ø‡ € ñô'òô&÷Pð r;   rß   c                   ó.   a € ] tR tRt o RtRR ltRtV tR# )ÚConllChunkCorpusReaderi1  zT
A ConllCorpusReader whose data file contains three columns: words,
pos, and chunk.
Nc                ó@   € \         P                  V VVRVVVVR7       R# )r	   )r&   r*   r,   r-   N)r	   r
   r   )r   r   )r"   r#   r$   r&   r*   r,   r-   s   &&&&&&&r1   r   ÚConllChunkCorpusReader.__init__7  s/   € ô 	×"Ñ"ØØØØ%Ø#ØØØð 	#ö 		
r;   r)  )r   NN)rë   rì   rí   rî   rï   r   ró   rô   rõ   s   @r1   r+  r+  1  s   ø‡ € ñ÷

ò 
r;   r+  )rï   r  Únltk.corpus.reader.apiÚnltk.corpus.reader.utilÚnltk.tagr   Ú	nltk.treer   Ú	nltk.utilr   r   r   r   rà   r£   rß   r+  r)  r;   r1   Ú<module>r3     sX   ðñó ä $Ü %Ý Ý ß 0ôDA˜ô DA÷NK
ñ K
ô\C˜4ô CôL
Ð.ö 
r;   