Package nltk :: Package corpus :: Package reader :: Module util :: Class SyntaxCorpusReader
[hide private]
[frames] | no frames]

Class SyntaxCorpusReader

source code

      object --+    
               |    
api.CorpusReader --+
                   |
                  SyntaxCorpusReader
Known Subclasses:

An abstract base class for reading corpora consisting of syntactically parsed text. Subclasses should define:

Instance Methods [hide private]
 
_parse(self, s) source code
 
_word(self, s) source code
 
_tag(self, s) source code
 
_read_block(self, stream) source code
 
raw(self, files=None) source code
 
parsed_sents(self, files=None) source code
 
tagged_sents(self, files=None, simplify_tags=False) source code
 
sents(self, files=None) source code
 
tagged_words(self, files=None, simplify_tags=False) source code
 
words(self, files=None) source code

Inherited from api.CorpusReader: __init__, __repr__, abspath, abspaths, encoding, files, open

Inherited from api.CorpusReader (private): _get_root

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

    Block Readers
 
_read_word_block(self, stream) source code
 
_read_tagged_word_block(self, stream, simplify_tags=False) source code
 
_read_sent_block(self, stream) source code
 
_read_tagged_sent_block(self, stream, simplify_tags=False) source code
 
_read_parsed_sent_block(self, stream) source code
    Deprecated since 0.8
 
read(*args, **kwargs) source code
 
parsed(*args, **kwargs) source code
 
tokenized(*args, **kwargs) source code
 
tagged(*args, **kwargs) source code
    Deprecated since 0.9.1

Inherited from api.CorpusReader: filenames

Inherited from api.CorpusReader (private): _get_items

Instance Variables [hide private]

Inherited from api.CorpusReader (private): _encoding, _files, _root

Properties [hide private]

Inherited from api.CorpusReader: root

Inherited from object: __class__

    Deprecated since 0.9.1

Inherited from api.CorpusReader: items

Method Details [hide private]

read(*args, **kwargs)

source code 
Decorators:
  • @deprecated("Use .raw() or .sents() or .tagged_sents() or " ".parsed_sents() instead.")

Deprecated: Use .raw() or .sents() or .tagged_sents() or .parsed_sents() instead.

parsed(*args, **kwargs)

source code 
Decorators:
  • @deprecated("Use .parsed_sents() instead.")

Deprecated: Use .parsed_sents() instead.

tokenized(*args, **kwargs)

source code 
Decorators:
  • @deprecated("Use .sents() instead.")

Deprecated: Use .sents() instead.

tagged(*args, **kwargs)

source code 
Decorators:
  • @deprecated("Use .tagged_sents() instead.")

Deprecated: Use .tagged_sents() instead.