No project description provided
Project description
BMP
Install
From PyPi:
pip install bmp
From Source:
pip install maturin
maturin build -r
pip install target/wheels/*.whl
Usage
Index from CIFF
from bmp import ciff2bmp
ciff2bmp(ciff_file="/path/to/ciff", output="/path/to/index", bsize=32, compress_range=False)
Index with Python
from bmp import Indexer
indexer = Indexer('/path/to/index', bsize=32, compress_range=False)
indexer.add_document('doc1', {'a': 1, 'b': 5, 'c': 8}) # docid, vector
indexer.add_document('doc2', {'a': 2, 'c': 1, 'd': 8, 'f': 2})
...
indexer.finish()
Search
from bmp import search, Searcher
# batch operation
results = search(index="/path/to/index", queries="/path/to/queries", k=10, alpha=1.0, beta=1.0)
# -> str (TREC run file)
# query-by-query operation
searcher = Searcher("/path/to/index") # loads index into memory once
searcher.search({'tok1': 5.3, 'tok2': 1.1}, k=10, alpha=1.0, beta=1.0)
# -> Tuple[List[str], List[float]] (doc IDs, scores) for this query
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bmp-0.2.2-cp312-cp312-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: bmp-0.2.2-cp312-cp312-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 895.2 kB
- Tags: CPython 3.12, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be33e97f7a936bfcbe15bc03f96bf1ebcefff42f6b07e4de5cb4c75fc20600e7
|
|
| MD5 |
a295f6716ed7848e6967b8b36550e755
|
|
| BLAKE2b-256 |
8d195a178f228754459991e7b7f7030874aad3538ceb6472e6421020a6f31a4d
|
File details
Details for the file bmp-0.2.2-cp311-cp311-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: bmp-0.2.2-cp311-cp311-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 895.4 kB
- Tags: CPython 3.11, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a546ef0b40ce83fb0b3af6c4a4a24d6a49a7455c7502dff132f553913fab48d3
|
|
| MD5 |
cb8e0a86a65835ac4a71715d172b87b9
|
|
| BLAKE2b-256 |
434cb19ead2e68e7a25ee4f20a108a1af1e1b1f8946ed112160e06c37104c092
|
File details
Details for the file bmp-0.2.2-cp310-cp310-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: bmp-0.2.2-cp310-cp310-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 895.4 kB
- Tags: CPython 3.10, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9290aa3e2b76aa48eb9cfaa71304c1ed14b5e3237093a4b9d6b066c52c70a621
|
|
| MD5 |
d7519bf404f414377d4e00edd7adedc6
|
|
| BLAKE2b-256 |
805f6be3582c61356769bf8f536b0689feba89ca19e57bcf015da019379dca2a
|