Package nltk :: Module downloader :: Class Package
[hide private]
[frames] | no frames]

type Package

source code

object --+
         |
        Package

A directory entry for a downloadable package. These entries are extracted from the XML index file that is downloaded by Downloader. Each package consists of a single file; but if that file is a zip file, then it can be automatically decompressed when the package is installed.

Instance Methods [hide private]
 
__init__(self, id, url, name=None, subdir='', size=None, unzipped_size=None, checksum=None, svn_revision=None, copyright='Unknown', contact='Unknown', license='Unknown', author='Unknown', unzip=True, **kw) source code
 
__repr__(self) source code
Static Methods [hide private]
 
fromxml(xml) source code
Instance Variables [hide private]
  id
A unique identifier for this package.
  name
A string name for this package.
  subdir
The subdirectory where this package should be installed.
  url
A URL that can be used to download this package's file.
  size
The filesize (in bytes) of the package file.
  unzipped_size
The total filesize of the files contained in the package's zipfile.
  checksum
The MD-5 checksum of the package file.
  svn_revision
A subversion revision number for this package.
  copyright
Copyright holder for this package.
  contact
Name & email of the person who should be contacted with questions about this package.
  license
License information for this package.
  author
Author of this package.
  filename
The filename that should be used for this package's file.
  unzip
A flag indicating whether this corpus should be unzipped by default.
Method Details [hide private]

__init__(self, id, url, name=None, subdir='', size=None, unzipped_size=None, checksum=None, svn_revision=None, copyright='Unknown', contact='Unknown', license='Unknown', author='Unknown', unzip=True, **kw)
(Constructor)

source code 
Overrides: object.__init__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 
Overrides: object.__repr__
(inherited documentation)

Instance Variable Details [hide private]

subdir

The subdirectory where this package should be installed. E.g., 'corpora' or 'taggers'.

filename

The filename that should be used for this package's file. It is formed by joining self.subdir with self.id, and using the same extension as url.