Inverted Index
Project description
Inverted Index
A small extensiable python inverted index. It supports retevial by boolean AND
s 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(...)
ii.index(my_documents)
user_input = prompt("> ", completer=SearchCompleter(ii), complete_while_typing=False)
# Do things with user_input
print(user_input)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
inverted-index-0.1.1.tar.gz
(3.7 kB
view hashes)
Built Distribution
Close
Hashes for inverted_index-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2f9213216e14575b345adfdd43254df2e1d457c89bb0d5b2ea955e8a5a3fec7 |
|
MD5 | 5ebcebf34417603fa096038adc3f12b2 |
|
BLAKE2b-256 | ac84daed8ebfa5111d0e1bbed7a4ccd639cc78a2231f8576ba20482ac020aa7d |