Module Expr Str ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list AttributeLoad NameLoad attr ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Return Call NameLoad ListComp Call NameLoad NameLoad AttributeLoad NameLoad attr keyword NameLoad comprehension TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call NameLoad ListComp Call NameLoad NameLoad AttributeLoad NameLoad attr keyword NameLoad comprehension TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body If CompareIs NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr orelse If Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign NameStore ListLoad NameLoad Return Call NameLoad ListComp Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr comprehension NameStore NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr If NameLoad body Return ListLoad Call NameLoad Call AttributeLoad NameLoad attr orelse Return ListLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr If NameLoad body Return ListLoad Call NameLoad Call AttributeLoad NameLoad attr orelse Return ListLoad decorator_list decorator_list
N/A N/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.
 __future__ unicode_literals nltk compat nltk.corpus.reader.util * nltk.corpus.reader.api * PPAttachment N/A object N/A __init__ N/A N/A self sent verb noun1 prep noun2 attachment N/A N/A N/A N/A self sent sent N/A N/A self verb verb N/A N/A self noun1 noun1 N/A N/A self prep prep N/A N/A self noun2 noun2 N/A N/A self attachment attachment N/A __repr__ N/A N/A self N/A N/A N/A N/A PPAttachment(sent=%r, verb=%r, noun1=%r, prep=%r, noun2=%r, attachment=%r) N/A N/A self sent N/A self verb N/A self noun1 N/A self prep N/A self noun2 N/A self attachment N/A N/A N/A compat python_2_unicode_compatible PPAttachmentCorpusReader N/A CorpusReader N/A N/A 
    sentence_id verb noun1 preposition noun2 attachment
     attachments N/A N/A self fileids N/A N/A N/A N/A concat N/A N/A StreamBackedCorpusView fileid N/A self _read_obj_block encoding enc N/A N/A fileid enc N/A N/A self abspaths fileids True N/A tuples N/A N/A self fileids N/A N/A N/A N/A concat N/A N/A StreamBackedCorpusView fileid N/A self _read_tuple_block encoding enc N/A N/A fileid enc N/A N/A self abspaths fileids True N/A raw N/A N/A self fileids N/A None N/A N/A N/A fileids None N/A N/A fileids N/A self _fileids N/A N/A N/A isinstance fileids N/A compat string_types N/A N/A fileids N/A fileids N/A N/A concat N/A N/A N/A N/A N/A self open f read N/A f fileids N/A _read_tuple_block N/A N/A self stream N/A N/A N/A line N/A N/A stream readline N/A line N/A N/A N/A N/A tuple N/A N/A line split N/A N/A N/A N/A _read_obj_block N/A N/A self stream N/A N/A N/A line N/A N/A stream readline N/A line N/A N/A N/A N/A PPAttachment N/A N/A line split N/A N/A N/A N/A N/A