prosaic-core
General-purpose natural language generation from structured data.
prosaic-core turns structured events into deterministic prose. It tracks
discourse state across renders, so consecutive sentences can use pronouns,
connectives, varied list styles, salience-aware template variants, and
document-level aggregation without depending on an LLM.
Install
[]
= "1.0.1"
= "1.0.1"
Add prosaic-derive for compile-time context and template checks, and add a
vocabulary crate such as prosaic-vocab-code when you want built-in templates.
Quick Start
use ;
use English;
Highlights
- Template syntax with slots, pipes, conditionals, partials, and variant tiers.
- Discourse-aware references through
{name|refer}and{name|possessive}. - Salience-aware variant selection and deterministic variation strategies.
- Document planning and batch rendering for multi-event narratives.
- English, Spanish, and German support through sibling grammar crates.
- Optional serde, parallel rendering, polish, relative-time, and REG features.
no_std + allocsupport withdefault-features = false.
Cargo Features
std(default): standard-library error support and system-time fallbacks.time(default):{ts|relative}and{ts|since_last}pipes.polish(default): smart quotes and sentence-length splitting.reg(default): referring-expression generation.serde: serialization for core public data types.parallel: rayon-backed document paragraph rendering.
License
MIT OR Apache-2.0