Skip to main content

Inverted Index

Project description

Inverted Index

PyPi Version Actions Status Code style: black

A small extensiable python inverted index. It supports retevial by boolean ANDs and ranking of the returned results. The point is a skeleton to add quick and dirty search to a script.

It also includes a prompt_toolkit completer that can each the inverted index as you type. When you select a auto-suggest option it will replace your prompt. The best way I have found to use this is to set it up to trigger only when you ask by hitting tab like so:

from prompt_toolkit import prompt
from inverted_index.prompt import SearchCompleter
from inverted_index.inverted_index import InvertedIndex

# Create your index
ii = InvertedIndex(...)

user_input = prompt("> ", completer=SearchCompleter(ii), complete_while_typing=False)
# Do things with user_input

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 inverted-index, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size inverted_index-0.1.1-py3-none-any.whl (5.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size inverted-index-0.1.1.tar.gz (3.7 kB) 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