Skip to main content

nltk.util.Index in a standalone package.

Project description

# pip install justindex
# >>> from justindex import index

>>> index((len(s), s) for s in 'a b'.split())
defaultdict(<class 'list'>, {1: ['a', 'b']})
>>> index((len(s), s) for s in ''.split())
defaultdict(<class 'list'>, {})
>>> sorted(index((len(s), s) for s in 'a b cc'.split()).items())
[(1, ['a', 'b']), (2, ['cc'])]

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for justindex, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size justindex-0.1.0.tar.gz (903 Bytes) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page