anno-core
Stable data model and invariants for anno: entities, spans, tracks, signals, coreference chains, and corpus types.
This crate intentionally avoids CLI and evaluation dependencies so it can serve as the shared type foundation across the anno workspace.
Install
[]
= "0.3"
Key types
| Type | Purpose |
|---|---|
Entity |
A named entity with span, type, confidence, and provenance |
Span |
Character-offset range (Unicode scalar values, not bytes) |
Signal / Track |
Layered extraction outputs with provenance tracking |
CorefChain / CorefDocument |
Within-document coreference clusters |
Identity |
Cross-document entity identity |
Corpus |
Collection of grounded documents |
Relation |
Typed (head, relation, tail) triple |
...and ~30 supporting types; see docs.rs for the full API.
Usage
use ;
let entity = new
.span
.confidence
.build;
assert_eq!;
assert_eq!;
Offset invariant
All spans use character offsets (Unicode scalar values), not byte offsets. See the CONTRACT for details.
License
Dual-licensed under MIT or Apache-2.0.