
    Of
                     F    S r SSK7  SSK7   " S S5      r " S S\5      rg)a  
Read lines from the Prepositional Phrase Attachment Corpus.

The PP Attachment Corpus contains several files having the format:

sentence_id verb noun1 preposition noun2 attachment

For example:

42960 gives authority to administration V
46742 gives inventors of microchip N

The PP attachment is to the verb phrase (V) or noun phrase (N), i.e.:

(VP gives (NP authority) (PP to administration))
(VP gives (NP inventors (PP of microchip)))

The corpus contains the following files:

training:   training set
devset:     development test set, used for algorithm development.
test:       test set, used to report results
bitstrings: word classes derived from Mutual Information Clustering for the Wall Street Journal.

Ratnaparkhi, Adwait (1994). A Maximum Entropy Model for Prepositional
Phrase Attachment.  Proceedings of the ARPA Human Language Technology
Conference.  [http://www.cis.upenn.edu/~adwait/papers/hlt94.ps]

The PP Attachment Corpus is distributed with NLTK with the permission
of the author.
    )*c                        \ rS rSrS rS rSrg)PPAttachment-   c                 L    Xl         X l        X0l        X@l        XPl        X`l        g Nsentverbnoun1prepnoun2
attachment)selfr
   r   r   r   r   r   s          =/usr/lib/python3/dist-packages/nltk/corpus/reader/ppattach.py__init__PPAttachment.__init__.   s     		
	
$    c                     SU R                   < SU R                  < SU R                  < SU R                  < SU R                  < SU R
                  < S3$ )NzPPAttachment(sent=z, verb=z, noun1=z, prep=z, noun2=z, attachment=)r	   )r   s    r   __repr__PPAttachment.__repr__6   s4     yy$))TZZDJJY	
r   )r   r   r   r   r
   r   N)__name__
__module____qualname____firstlineno__r   r   __static_attributes__ r   r   r   r   -   s    %
r   r   c                   0    \ rS rSrSrS rS rS rS rSr	g)	PPAttachmentCorpusReader>   z5
sentence_id verb noun1 preposition noun2 attachment
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 NT)encoding)concatabspathsStreamBackedCorpusView_read_obj_blockr   fileidsfileidencs       r   attachments$PPAttachmentCorpusReader.attachmentsC   sK     &*]]7D%A%AMV 'v/C/CcR%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#   )r%   r&   r'   _read_tuple_blockr)   s       r   tuplesPPAttachmentCorpusReader.tuplesK   sL     &*]]7D%A%AMV 'v/E/EPST%A
 	
r/   c                 h    UR                  5       nU(       a  [        UR                  5       5      /$ / $ r   )readlinetuplesplitr   streamlines      r   r1   *PPAttachmentCorpusReader._read_tuple_blockS   s*     $**,'((Ir   c                 b    UR                  5       nU(       a  [        UR                  5       6 /$ / $ r   )r5   r   r7   r8   s      r   r(   (PPAttachmentCorpusReader._read_obj_blockZ   s*      $**,/00Ir   r   N)
r   r   r   r   __doc__r-   r2   r1   r(   r   r   r   r   r    r    >   s    

r   r    N)r>   nltk.corpus.reader.apinltk.corpus.reader.utilr   CorpusReaderr    r   r   r   <module>rB      s)   @ % %
 
"!| !r   