Skip to main content

misakanet-core

Zero-dependency BM25 search engine with RRF fusion — extracted from MisakaNet.

  • Pure Python, stdlib only
  • BM25 ranking with configurable k1/b
  • Metadata-weighted scoring
  • RRF (Reciprocal Rank Fusion) for multi-query fusion
  • CJK-aware tokenization
  • Works in air-gapped environments

Installation

pip install misakanet-core

Usage

from misakanet_core import BM25, ScoredDocument, tokenize, rrf

# Prepare corpus
docs = [
    ScoredDocument("doc1", tokenize("the cat sat on the mat")),
    ScoredDocument("doc2", tokenize("the dog sat on the log")),
    ScoredDocument("doc3", tokenize("cats and dogs are friends")),
]

# Build index and search
engine = BM25(docs)
results = engine.search("cat dog", top_k=5)

for result in results:
    print(f"{result.doc_id}: {result.score:.4f}")

# Multi-query fusion with RRF
from misakanet_core import SearchResult, rrf
query1 = engine.search("cat")
query2 = engine.search("dog")
fused = rrf([query1, query2], top_k=3)

Why not use elasticsearch / tantivy / whoosh?

misakanet-core elasticsearch tantivy whoosh
Dependencies Zero JVM Rust toolchain Pure Python
Install time 0.5s 5min+ 2min+ 2s
Air-gapped
CJK support ⚠️ ⚠️

License

MIT

Release files for misakanet-core 2.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for misakanet-core 2.7.0
File Size Uploaded
misakanet_core-2.7.0.tar.gz 5.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for misakanet-core 2.7.0
File Interpreter ABI Platform
misakanet_core-2.7.0-py3-none-any.whl Python 3 none any Details

Total release size: 9.2 kB

Release files / misakanet_core-2.7.0.tar.gz

Download URL misakanet_core-2.7.0.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
0762e9835a79ac23d5323ec077c8d6a91c046fd62bdac9d40c5a5bb3325cf5ed
BLAKE2b-256 checksum
How to use checksums
3cd3d8d4d396740c13ec03da66159a6c3036cd063e04582c2fc78632cf479775
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 13, 2026.

Transparency log

Release files / misakanet_core-2.7.0-py3-none-any.whl

Download URL misakanet_core-2.7.0-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9d658c0d7d54e271928eee1638937b1feae9067e8c1f82750c185e26ef90a063
BLAKE2b-256 checksum
How to use checksums
28d67f9887d17ccc57fd269b876c3e022cabd820efd78881bb2fc606aa2c0a52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 13, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2.7.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page