Skip to main content

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

If you're not sure about the file name format, learn more about wheel file names.

bmp-0.2.2-cp312-cp312-manylinux_2_34_x86_64.whl (895.2 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

bmp-0.2.2-cp311-cp311-manylinux_2_34_x86_64.whl (895.4 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

bmp-0.2.2-cp310-cp310-manylinux_2_34_x86_64.whl (895.4 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

File details

Details for the file bmp-0.2.2-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for bmp-0.2.2-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 be33e97f7a936bfcbe15bc03f96bf1ebcefff42f6b07e4de5cb4c75fc20600e7
MD5 a295f6716ed7848e6967b8b36550e755
BLAKE2b-256 8d195a178f228754459991e7b7f7030874aad3538ceb6472e6421020a6f31a4d

See more details on using hashes here.

File details

Details for the file bmp-0.2.2-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for bmp-0.2.2-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 a546ef0b40ce83fb0b3af6c4a4a24d6a49a7455c7502dff132f553913fab48d3
MD5 cb8e0a86a65835ac4a71715d172b87b9
BLAKE2b-256 434cb19ead2e68e7a25ee4f20a108a1af1e1b1f8946ed112160e06c37104c092

See more details on using hashes here.

File details

Details for the file bmp-0.2.2-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for bmp-0.2.2-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 9290aa3e2b76aa48eb9cfaa71304c1ed14b5e3237093a4b9d6b066c52c70a621
MD5 d7519bf404f414377d4e00edd7adedc6
BLAKE2b-256 805f6be3582c61356769bf8f536b0689feba89ca19e57bcf015da019379dca2a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page