
    Off                     f    S r SSKrSSK7  SSSSSS	S
.r\" \5      r " S S5      r " S S\5      rg)a)  
Corpus reader for the Information Extraction and Entity Recognition Corpus.

NIST 1999 Information Extraction: Entity Recognition Evaluation
https://www.itl.nist.gov/iad/894.01/tests/ie-er/er_99/er_99.htm

This corpus contains the NEWSWIRE development test data for the
NIST 1999 IE-ER Evaluation.  The files were taken from the
subdirectory: ``/ie_er_99/english/devtest/newswire/*.ref.nwt``
and filenames were shortened.

The corpus contains the following files: APW_19980314, APW_19980424,
APW_19980429, NYT_19980315, NYT_19980403, and NYT_19980407.
    N)*z&Associated Press Weekly, 14 March 1998z&Associated Press Weekly, 24 April 1998z&Associated Press Weekly, 29 April 1998zNew York Times, 15 March 1998zNew York Times, 3 April 1998zNew York Times, 7 April 1998)APW_19980314APW_19980424APW_19980429NYT_19980315NYT_19980403NYT_19980407c                   $    \ rS rSrSS jrS rSrg)IEERDocument*   Nc                 @    Xl         X l        X0l        X@l        XPl        g N)textdocnodoctype	date_timeheadline)selfr   r   r   r   r   s         9/usr/lib/python3/dist-packages/nltk/corpus/reader/ieer.py__init__IEERDocument.__init__+   s    	
"     c                 b   U R                   (       a*  SR                  U R                   R                  5       5      nOJSR                  U R                  R                  5        Vs/ s H  o"S S S:w  d  M  UPM     snS S 5      S-   nU R                  b  SU R                   SU< S3$ S	U-  $ s  snf )
N    <   z...z<IEERDocument z: >z<IEERDocument: %r>)r   joinleavesr   r   )r   r   ws      r   __repr__IEERDocument.__repr__2   s    ==xx 4 4 67H TYY%5%5%7H%7Ra5C<!%7H"MNQVV  ::!#DJJ<r(Q??'(22 Is   #B,3B,)r   r   r   r   r   )NNN )__name__
__module____qualname____firstlineno__r   r"   __static_attributes__ r   r   r   r   *   s    !
3r   r   c                   >    \ rS rSrSrS
S jrS
S jrS rS rS r	S	r
g)IEERCorpusReader?   r$   Nc                     [        U R                  US5       VVs/ s H  u  p#[        X R                  US9PM     snn5      $ s  snnf NT)encoding)concatabspathsStreamBackedCorpusView_read_blockr   fileidsfileidencs       r   docsIEERCorpusReader.docsB   sK     &*]]7D%A%AMV 'v/?/?#N%A
 	
    A
c                     [        U R                  US5       VVs/ s H  u  p#[        X R                  US9PM     snn5      $ s  snnf r/   )r1   r2   r3   _read_parsed_blockr5   s       r   parsed_docsIEERCorpusReader.parsed_docsJ   sL     &*]]7D%A%AMV 'v/F/FQTU%A
 	
r;   c                     U R                  U5       Vs/ s H2  nU R                  U5      R                  c  M!  U R                  U5      PM4     sn$ s  snf r   )r4   _parser   )r   streamdocs      r   r=   #IEERCorpusReader._read_parsed_blockR   sQ     ''/
/{{3%% DKK/
 	
 
s
    AAc                     [         R                  R                  USS9n[        U[        5      (       a  [        S0 UD6$ [        U5      $ )NDOCUMENT)
root_labelr*   )nltkchunkieerstr2tree
isinstancedictr   )r   rC   vals      r   rA   IEERCorpusReader._parseZ   sA    jj%%cj%Ac4  &#&&$$r   c                 .   / n UR                  5       nU(       d  OUR                  5       S:X  a  OM/  UR                  U5         UR                  5       nU(       d  O(UR                  U5        UR                  5       S:X  a  OM@  SR                  U5      /$ )Nz<DOC>z</DOC>
)readlinestripappendr   )r   rB   outlines       r   r4   IEERCorpusReader._read_blocka   s    ??$Dzz|w&  	

4??$DJJtzz|x'  		#r   r*   r   )r%   r&   r'   r(   __doc__r9   r>   r=   rA   r4   r)   r*   r   r   r,   r,   ?   s    


% r   r,   )	rW   rH   nltk.corpus.reader.apititlessorted	documentsr   CorpusReaderr,   r*   r   r   <module>r]      sN     $
 =<<322
 6N	3 3*5 | 5 r   