Semantic Annotations
Typed inline annotations that survive format conversion — not just bold and italic, but ingredients, mentions, coordinates, and any structured data.
A document model built on panproto that preserves semantic meaning across editors, protocols, and representations.
WARNING
This documentation is nearly fully LLM-generated. Proceed with caution. We appreciate any suggestions or reports of issues at github.com/relationaltext/relationaltext.
Every text format — Markdown, ProseMirror, Quill, Bluesky, Notion — can be understood as a vocabulary of typed annotations over a text sequence. Converting between formats is remapping vocabularies. RelationalText makes that conversion infrastructure first-class.
The core insight: documents are UTF-8 text plus byte-ranged facets (typed annotations). Each facet carries features identified by NSIDs — the same namespace system used by AT Protocol — so the vocabulary of annotations is as open as the web itself.
Format conversion is powered by panproto, an engine for schematic version control built on generalized algebraic theories. RelationalText uses panproto at every layer:
rename, drop, add, pullback, and directed equationsThis means a v1 document upgrades to v2 transparently, and a v2 document still round-trips to v1 wherever the mapping is lossless.
Once annotated text is treated as first-class infrastructure, the possibilities compound. Collaborative editing is CRDT-safe. Any byte range can carry typed semantic annotations — not just a hyperlink, but a mention with a handle, a place with coordinates, a product with an ID. Lenses decouple intent from rendering, so "embed a YouTube video here" can mean a player, a thumbnail, a transcript, or a bare link depending on context. Documents store their original format's features as a permanent namespace alongside the normalized hub representation, making backward-compatible re-import always possible.
Ship a WASM blob and a lexicon JSON and a new format joins the shared conversion graph without permission or coordination.