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

type SyntaxCorpusReader

source code

  object --+    
           |    
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, fileids=None) source code
 
parsed_sents(self, fileids=None) source code
 
tagged_sents(self, fileids=None, simplify_tags=False) source code
 
sents(self, fileids=None) source code
 
tagged_words(self, fileids=None, simplify_tags=False) source code
 
words(self, fileids=None) source code

Inherited from CorpusReader: __init__, __repr__, abspath, abspaths, encoding, fileids, open, readme

Inherited from CorpusReader (private): _get_root

    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
 
parsed(self, items=None)
 
read(self, items=None, format='parsed')
 
tagged(self, items=None)
 
tokenized(self, items=None)
    Deprecated since 0.9.7

Inherited from CorpusReader: files

    Deprecated since 0.9.1

Inherited from CorpusReader: items

Inherited from CorpusReader (private): _get_items

Instance Variables [hide private]

Inherited from CorpusReader (private): _encoding, _fileids, _root

Properties [hide private]

Inherited from CorpusReader: root

Method Details [hide private]

parsed(self, items=None)

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

read(self, items=None, format='parsed')

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

tagged(self, items=None)

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

tokenized(self, items=None)

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