Class LazyCorpusLoader
source code
object --+
|
LazyCorpusLoader
A proxy object which is used to stand in for a corpus object before
the corpus is loaded. This allows NLTK to create an object for each
corpus, but defer the costs associated with loading those corpora until
the first time that they're actually accessed.
The first time this object is accessed in any way, it will load the
corresponding corpus, and transform itself into that corpus (by modifying
its own __class__
and __dict__
attributes).
If the corpus can not be found, then accessing this object will raise
an exception, displaying installation instructions for the NLTK data
package. Once they've properly installed the data package (or modified
nltk.data.path
to point to its location), they can then use
the corpus object without restarting python.
|
__init__(self,
name,
reader_cls,
*args,
**kwargs)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature |
source code
|
|
|
|
|
|
|
|
Inherited from object :
__delattr__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__setattr__ ,
__str__
|
Inherited from object :
__class__
|
__init__(self,
name,
reader_cls,
*args,
**kwargs)
(Constructor)
| source code
|
x.__init__(...) initializes x; see x.__class__.__doc__ for
signature
- Overrides:
object.__init__
- (inherited documentation)
|
repr(x)
- Overrides:
object.__repr__
- (inherited documentation)
|