Suggest a category when saving a note.
Prototype suggested tags for saved notes, with a review step before accepting a category.
Build with SprigTurn a passage into a topic. Six useful categories, a compact classifier, and no network round trip.
Sprig assigns a passage to one of six broad English topics. Its small vocabulary makes it useful for studying local classification and content-routing interfaces. It cannot invent new categories or assign multiple topics.
Research v0.1.0 · A statistical classifier, not a generative foundation model.
Lowercase the input and extract Unicode words plus adjacent word pairs.
Use the vocabulary counts learned from the training sentences to compute a score for each topic.
Rank the topics and return one label. Ambiguous passages can receive a confident wrong answer.
Actual model inference, inside your browser.
No input is uploaded.
Scores are relative model outputs, not calibrated confidence.
Starting points for prototypes.
Validate the model for your use case.
Prototype suggested tags for saved notes, with a review step before accepting a category.
Build with SprigExplore a reading-list interface that groups items into six fixed topics.
Build with SprigCompare a tiny statistical classifier with a richer model on your own labeled examples.
Build with Sprig60 English sentences authored by the coding assistant: ten per topic, written directly in the training script. They are short illustrative examples, not news articles, web documents, or an independently labeled dataset.
Eight sentences per class are used for training and the last two per class for evaluation. Both sets come from the same small authored collection.
No third-party model weights, external datasets, or user inputs were used to train this version. Training records are kept private. We publish weights, model cards, aggregate results, and the limitations of each release.
Multinomial naïve Bayes · words and word pairs
Each release includes its model card, measured artifact size, and SHA-256 checksum. Training data and working checkpoints stay private.
Use the local workspace packages today. These packages have not been published to npm or Maven Central.
Run from the repository root, then import the model from a workspace example.
bun install
bun run sdk:buildWith JDK 17+ and Gradle 8.10+, publish the modules to your local Maven repository.
gradle test
gradle publishToMavenLocalrepositories {
mavenLocal()
mavenCentral()
}
dependencies {
implementation("dev.embermote:sprig:0.1.0")
}Kotlin/JVM tests pass. Android device validation, Swift, and native Core ML/LiteRT adapters are not available.
import { createModel } from '@embermote/sprig';
const model = createModel();
const input = "Investors expect stock market profits to grow.";
const result = model.predict(input);
console.log(result.label);
// Scores are not calibrated confidence.040bbf25067e2b3efac9f8767e07fcd03c2bd4401466c3c44797591e5f9abe00The current artifact has six fixed labels. You can change the training data and rebuild, but adding new labels requires training a new artifact and evaluating it.
Inference runs locally. The website and artifact download make ordinary network requests, but the demos do not upload your input. Bundled SDK inference does not need an inference server.
Sprig stores a compact statistical representation for a narrow task. Its 31.3 KB artifact is not equivalent to a neural model of a different size, and the file size is not its total runtime memory.
This is a research baseline. Independent evaluation, task-specific acceptance criteria, real-device measurements, and release packaging remain necessary before production use.
Inspect the pieces behind this model.