Skip to main content

Crate edgextract

Crate edgextract 

Source
Expand description

Closed-decision knowledge graph extraction from text and an ontology.

First principles (FP-1..FP-8): the caller owns the question and the legal answers; the model returns a distribution over those labels; nobody invents a free-text type name.

Re-exports§

pub use decisions::DECISION_CONTRACT;
pub use error::Error;
pub use error::Result;
pub use error::SystemOneError;
pub use gate::GateConfig;
pub use ontology::load_ontology;
pub use ontology::load_ontology_named;
pub use ontology::Ontology;
pub use pipeline::extract_text;
pub use pipeline::Extractor;
pub use systemone::SystemOneClient;
pub use types::ExtractionResult;

Modules§

assemble
Merge typed mentions and relation hits into EdgeQuake-shaped records.
audit
Deterministic checks on a finished graph. No model judge.
benchmarks
Convert SpERT CoNLL04 JSON into span-labeled gold.
cache
Decision cache and run ledger. Same (model, state, questions) never hits the host twice.
candidates
Propose mention spans. The decision model never finds spans on its own.
decisions
Turn mentions and pairs into closed System One questions.
error
eval
Offline scores against a golden set. Deterministic. No model judge.
gate
Accept / Review / Reject. Thresholds live in code, not in the model.
markdown
Markdown to sentences with offsets and heading path. Code fences stay data, not questions.
names
Canonical entity names, copied in spirit from EdgeQuake EntityId.
ontology
Fixed ontology: entity types, relations, and allowed (domain, relation, range) edges.
pipeline
End-to-end extract: parse, propose, decide, gate, assemble.
span_encoder
Optional span proposers. The decision model still assigns ontology types.
standin
A small, readable stand-in for a decision model.
systemone
HTTP client for Ollama POST /v1/systemone. Fail closed on a bad answer.
testing
Stand-in for POST /v1/systemone.
types