Package nltk :: Package corpus :: Package reader :: Module string_category :: Class StringCategoryCorpusReader
[hide private]
[frames] | no frames]

Class StringCategoryCorpusReader

source code

      object --+    
               |    
api.CorpusReader --+
                   |
                  StringCategoryCorpusReader

Instance Methods [hide private]
 
__init__(self, root, files, delimiter=' ', encoding=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
tuples(self, files) source code
 
raw(self, files=None)
Returns: the text contents of the given files, as a single string.
source code
 
_read_tuple_block(self, stream) source code

Inherited from api.CorpusReader: __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__

    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]

__init__(self, root, files, delimiter=' ', encoding=None)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Parameters:
  • root - The root directory for this corpus.
  • files - A list or regexp specifying the files in this corpus.
  • delimiter - Field delimiter
Overrides: api.CorpusReader.__init__

raw(self, files=None)

source code 
Returns:
the text contents of the given files, as a single string.