I have raw long-form text
@lexweave/compile + core + renderCompile, plan, and render the complete loop.
Lexweave turns long-form text into a portable reading program, then plans deterministic word, phrase and sentence exposure for each reader without a read-time LLM.
The checked-in test rule replaces 灵石 with spirit stone. Change its action level to inspect the exact scaffold rendered for the reader.
candidates + annotationsexpressionsFromAssets()planReplacements()transformSection(){
from: '灵石',
to: 'spirit stone',
level: 1,
tier: 'word'
}三块灵石(spirit stone)在桌上
Source primary · target gloss visibleStart from the input object you already own. Each path names the minimum package surface and the output you can verify.
@lexweave/compile + core + renderCompile, plan, and render the complete loop.
@lexweave/core + renderBuild reader state and deterministic replacement rules.
@lexweave/renderApply known replacement rules to HTML or plain text.
lexweave CLIRun the offline sample before embedding packages.
Units are extracted and verified at compile time. At read time, Lexweave selects only the replacements that fit the current reader, location and flow budget.
Extract verbatim words, phrases, grammar and entities from the complete source.
Balance density, scaffolding, unit tier and novelty against comprehension.
The same source, bundle, reader state and parameters produce the same view.
No API key is required for the mock-provider demo.
Open Quickstart →git clone https://github.com/lexweave-hq/lexweave
cd lexweave && npm install && npm run build
# compile and render the bundled sample
npm run demo
# inspect the portable reading program
node packages/cli/dist/lexweave.cjs inspect \
examples/demo/sample-book.lexweave.jsonUse the full CLI or embed only the boundary your product needs.
Schemas, language units, flow budget, planning and reader memory.
npm i @lexweave/coreCompile long-form text into a portable reading program with any LLM.
npm i @lexweave/compileDeterministic replacement injection for HTML and plain text.
npm i @lexweave/renderCLI for compile, render and inspect workflows.
npm i lexweaveRead the planner. Inspect the bundle. Replace the model adapter. Run the renderer in a browser, WebView or Node.