Skip to main content

juricode-retrieval

Dense-retrieval core for JuriCode-JP, packaged (MIT) as the single source of truth for the parity-critical primitives.

What it provides

primitive purpose
_load_artefacts Load the embedding matrix (.npy), records (.meta.jsonl), and provider state (.vec.json, .vec.pkl fallback). Missing artefacts fail loudly.
_encode_queries Embed query strings via the artefact's provider (gemini / openai / tfidf). The openai and gemini clients are imported lazily.
_cosine_topk Cosine-similarity top-k of a query matrix against the corpus matrix.
dedup_by_article Collapse duplicate segments of the same article to the top-ranked one.

Why a package

tools/embed/retrieve.py re-imports these four objects, so every eval and service caller runs the identical function objects rather than a copy. The retrieval math is therefore unchanged by construction, and a test asserts the object identity (retrieve._load_artefacts is juricode_retrieval._load_artefacts).

Dependencies

numpy is required (imported lazily inside each primitive, so importing the package itself needs no numpy). google-genai is the production embedding provider; the openai and tfidf branches are optional and imported only when selected.

Metadata

Release files for juricode-retrieval 0.1.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 juricode-retrieval 0.1.0
File Size Uploaded Provenance
juricode_retrieval-0.1.0.tar.gz 12.5 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for juricode-retrieval 0.1.0
File Interpreter ABI Platform
juricode_retrieval-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 24.0 kB

Release files / juricode_retrieval-0.1.0.tar.gz

Download URL juricode_retrieval-0.1.0.tar.gz
Size 12.5 kB
Tags Source
SHA-256 checksum
How to use checksums
32fabf565b2c78db2103f789fac343402bd056417d619dcd4395aefa98086335
BLAKE2b-256 checksum
How to use checksums
91ca5d5d2d74bfccd2c55710d5cc7092e70892962626ce508a0f330fa5710a54
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 Jul 18, 2026.

Transparency log

Release files / juricode_retrieval-0.1.0-py3-none-any.whl

Download URL juricode_retrieval-0.1.0-py3-none-any.whl
Size 11.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
48e21d360e0274b55dffff00cb74cad8e4f5cc26f28941b67c643e16717217e6
BLAKE2b-256 checksum
How to use checksums
1f67f905f7184e8ca4793c986310d9c7707c078379903f6cd4f317dfb66b405f
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 Jul 18, 2026.

Transparency log

Security for juricode-retrieval 0.1.0

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for juricode_retrieval-0.1.0.tar.gz

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 Jul 18, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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