tokenless-semantic
Semantic-aware JSON field compression with ONNX embeddings.
Part of the tokenless toolkit.
Features
use SemanticCompressor;
let compressor = new;
// Level 1 (default): keyword-based context detection
let result = compressor.compress_fields;
// Level 2 (onnx feature): ONNX embedding similarity
let result = compressor.compress_with_context;
Levels
| Level | Feature | Description |
|---|---|---|
| Level 1 | default | Keyword rules from compiled-in TOML profiles. Zero deps, no model download. |
| Level 2 | onnx |
ONNX model (all-MiniLM-L6-v2, ~15 MB). Cosine similarity between field names and task context. Falls back to Level 1 automatically. |
Enable Level 2:
[]
= { = "0.4", = ["onnx"] }
Minimum Rust Version
Rust 2024 edition, MSRV 1.89.
License: Apache-2.0