Skip to main content

Module relation

Module relation 

Source
Expand description

Relation extraction — RDF-Star triple extraction via shallow patterns.

Pattern-based, deterministic. Recognised patterns:

  • “X is Y” → (X, rdf:type, Y)
  • “X has Y” → (X, has, Y)
  • “X located in Y”→ (X, locatedIn, Y)

Subjects/objects are noun-phrase windows around the trigger; spans are exact byte offsets into the source. WASM-compatible, no LLM.

Structs§

ExtractedRelation
One extracted relation with subject/object provenance and a confidence.

Functions§

extract_relations
Extract relations from text.