Documentation
¶
Overview ¶
Package semantic turns sources into a knowledge graph: ingest, parse, split, extract, then assert. Each stage is one interface with one job; a pipeline is their composition, so a caller may replace any one of them without touching the rest.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Extractor ¶
Extractor reads a chunk and states what it asserts. The chunk travels with each triple, so every assertion can be traced to its sentence.
type Ingester ¶
Ingester reads a reference — a path, a URL, a glob, a string — and returns the documents behind it. It is the only stage that touches the world outside the process.
type Parser ¶
Parser reads a document's format and returns the same document with its text made plain and what it learned recorded in Meta.
type Pipeline ¶
Pipeline runs the stages in order. A nil stage is skipped, so a caller that only wants to split does not have to supply an extractor.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package agent holds what an agent knows and what it decided.
|
Package agent holds what an agent knows and what it decided. |
|
cmd
|
|
|
semantic
command
Command semantic runs a pipeline over a reference and prints what it asserted, one tab-separated triple to a line.
|
Command semantic runs a pipeline over a reference and prints what it asserted, one tab-separated triple to a line. |
|
Package decision is the layer the graph exists for: what an agent knew, what it chose, under which rule, and what followed.
|
Package decision is the layer the graph exists for: what an agent knew, what it chose, under which rule, and what followed. |
|
Package dedupe decides which records are the same thing and which disagree.
|
Package dedupe decides which records are the same thing and which disagree. |
|
Package export writes a graph out in the formats other tools read.
|
Package export writes a graph out in the formats other tools read. |
|
Package extract turns text into entities, the relations between them, and the triples those relations assert.
|
Package extract turns text into entities, the relations between them, and the triples those relations assert. |
|
Package ingest turns a reference — a path, a pattern, a URL, stdin — into documents, and records where every document came from.
|
Package ingest turns a reference — a path, a pattern, a URL, stdin — into documents, and records where every document came from. |
|
Package kg folds extracted triples into a knowledge graph and answers questions about its shape.
|
Package kg folds extracted triples into a knowledge graph and answers questions about its shape. |
|
Package normalize is the cleanup between parsing a document and splitting it: the same sentence written with a non-breaking space, a curly apostrophe or a decomposed accent should reach the extractor as one string, not three.
|
Package normalize is the cleanup between parsing a document and splitting it: the same sentence written with a non-breaking space, a curly apostrophe or a decomposed accent should reach the extractor as one string, not three. |
|
Package ontology is the type system a graph is read through: classes, properties, the domains and ranges that connect them, and the subclass hierarchy over both.
|
Package ontology is the type system a graph is read through: classes, properties, the domains and ranges that connect them, and the subclass hierarchy over both. |
|
Package parse turns a raw document into text plus the structure the rest of the pipeline needs: section boundaries a splitter can respect, link targets, and — for tabular and tree formats — the decoded value itself.
|
Package parse turns a raw document into text plus the structure the rest of the pipeline needs: section boundaries a splitter can respect, link targets, and — for tabular and tree formats — the decoded value itself. |
|
Package prov records where a value came from, in W3C PROV-O terms: an Entity was generated by an Activity, which was run by an Agent.
|
Package prov records where a value came from, in W3C PROV-O terms: an Entity was generated by an Activity, which was run by an Agent. |
|
Package reason derives the facts a set of triples implies but does not state: what a transitive predicate reaches, what a symmetric or inverse predicate reads backwards, what a class hierarchy entails, and whatever rules a caller writes.
|
Package reason derives the facts a set of triples implies but does not state: what a transitive predicate reaches, what a symmetric or inverse predicate reads backwards, what a class hierarchy entails, and whatever rules a caller writes. |
|
Package split cuts a document into chunks.
|
Package split cuts a document into chunks. |
|
Package store holds the three ways a graph is kept: by similarity, by edge, and by assertion.
|
Package store holds the three ways a graph is kept: by similarity, by edge, and by assertion. |
|
qdrant
Package qdrant keeps vectors in Qdrant, over its JSON HTTP API.
|
Package qdrant keeps vectors in Qdrant, over its JSON HTTP API. |
|
sparql
Package sparql keeps a graph on a SPARQL 1.1 endpoint over HTTP.
|
Package sparql keeps a graph on a SPARQL 1.1 endpoint over HTTP. |