Static hybrid SPLADE and BM25 search for Sphinx documentation.
Project description
Sphinx SpladeX
SpladeX adds static, client-side hybrid search to Sphinx HTML documentation. At
build time it extracts pages and documented objects, creates SPLADE sparse
vectors plus a BM25 index, and writes assets into _static. At search time the
browser loads only those assets: it does not run or download a model.
Install
pip install sphinx-spladex
Development
Install the test and release tools, then run the release check:
pip install -e ".[dev]"
scripts/release-check.sh
Enable
Add the extension to conf.py:
extensions = ["spladex"]
The default model is Arvind0101/static-query-splade-code-docs. The model must
include a static_query_weights.pt file containing a one-dimensional
query_weights tensor matching the tokenizer vocabulary.
spladex_model_name = "Arvind0101/static-query-splade-code-docs"
spladex_device = "cpu"
spladex_max_length = 256
spladex_top_k_terms = 96
spladex_min_weight = 0.0
spladex_semantic_weight = 0.6
spladex_bm25_weight = 0.4
spladex_rrf_k = 60
After sphinx-build -b html docs docs/_build/html, the generated site includes
_static/model_semantic_index.json and _static/model_static_query_assets.json.
SpladeX reads tokenizer.json, tokenizer_config.json, and
static_query_weights.pt during the documentation build. It bundles their
tokenization rules and aligned weights into the local query-assets file; search
never requests those source files or a model from Hugging Face.
SpladeX replaces the standard Sphinx results with semantic hybrid results while retaining the usual Sphinx search-page presentation. It does not show relevance scores or provide a mode switch.
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
Built Distribution
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 sphinx_spladex-0.1.0.tar.gz.
File metadata
- Download URL: sphinx_spladex-0.1.0.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4f394a2798dc0e9766777d63ef4cf047ccbbf6a9403c3acd82dd15fba1fbb64
|
|
| MD5 |
a96e99eea3890a0e43fca788927da60f
|
|
| BLAKE2b-256 |
2ae95d9c54fcf43c72bef2146885a64bbfb9ba26d1e5458f90ebac8769b5bb65
|
Provenance
The following attestation bundles were made for sphinx_spladex-0.1.0.tar.gz:
Publisher:
publish.yml on arvindajaybharadwaj/sphinx-spladex
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sphinx_spladex-0.1.0.tar.gz -
Subject digest:
b4f394a2798dc0e9766777d63ef4cf047ccbbf6a9403c3acd82dd15fba1fbb64 - Sigstore transparency entry: 2231768160
- Sigstore integration time:
-
Permalink:
arvindajaybharadwaj/sphinx-spladex@9adfe0d5ac44ee58081d34a9890eba1152234bdb -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/arvindajaybharadwaj
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9adfe0d5ac44ee58081d34a9890eba1152234bdb -
Trigger Event:
release
-
Statement type:
File details
Details for the file sphinx_spladex-0.1.0-py3-none-any.whl.
File metadata
- Download URL: sphinx_spladex-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5bc5e3eb9f06db0e167b87900fe43c749825bc56e32ae63b204eae966cf378da
|
|
| MD5 |
3816395df664b4f1ea2571fc167317bd
|
|
| BLAKE2b-256 |
09422e5e634d139ccfa776d5f702e002d2836d092b2fd434be2dba62bedecdd6
|
Provenance
The following attestation bundles were made for sphinx_spladex-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on arvindajaybharadwaj/sphinx-spladex
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sphinx_spladex-0.1.0-py3-none-any.whl -
Subject digest:
5bc5e3eb9f06db0e167b87900fe43c749825bc56e32ae63b204eae966cf378da - Sigstore transparency entry: 2231768775
- Sigstore integration time:
-
Permalink:
arvindajaybharadwaj/sphinx-spladex@9adfe0d5ac44ee58081d34a9890eba1152234bdb -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/arvindajaybharadwaj
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9adfe0d5ac44ee58081d34a9890eba1152234bdb -
Trigger Event:
release
-
Statement type: