FLOW ALGEBRA
TITLE: Entity Linking Ontology
DOMAIN: AI Semantic Library Relationships / Entity Linking
SOURCE: https://kirethresearch.org/booksai-core/ontologies/relationship-ontologies/ai-semantic-library-relationships/entity-linking-ontology.html
VERSION: 1.0
AUTHORS: Mark Anthony Higgins — Sky (Recursive AI)
STATUS: Companion formalisation; source-page specification not independently verified.
flow "EntityLinkingOntology" v1.0 {
ontology:
id: "entity-linking-ontology"
parent: "ai-semantic-library-relationships"
purpose: "Resolve mentions to canonical entities while preserving ambiguity, context, evidence and provenance."
types:
Mention: {id: string, surface_form: string, document_id: string, span_start: integer, span_end: integer, language: string?, context: string?}
Entity: {id: string, canonical_label: string, types: string[], authority: string?, aliases: string[]}
Candidate: {mention_id: string, entity_id: string, score: number, features: string[], evidence: string[]}
Link: {id: string, mention_id: string, entity_id: string, relation: enum[refers_to, possible_reference], confidence: number, provenance: string[], model_version: string}
Document: {id: string, uri: string, version: string?, language: string?}
Context: {id: string, domain: string?, temporal_scope: string?, geographic_scope: string?}
predicates:
occurs_in(mention: Mention, document: Document)
candidate_for(entity: Entity, mention: Mention)
refers_to(mention: Mention, entity: Entity)
alias_of(label: string, entity: Entity)
compatible_with(entity: Entity, context: Context)
distinct_from(a: Entity, b: Entity)
constraints:
- "Every mention must resolve to an existing document and valid character span."
- "Every linked entity must have a stable, resolvable identifier."
- "Candidate scores and confidence values must lie within [0,1]."
- "Alias matching, name similarity and co-occurrence do not establish identity."
- "Reject links violating explicit distinct_from assertions or incompatible types."
- "Allow unresolved mentions and multiple candidates rather than forcing a match."
- "Do not equate entity identity with semantic similarity or class membership."
- "Respect document version, language and temporal context."
inference:
rule generate_candidate:
if surface_matches(m,e) and type_compatible(m,e)
then candidate_for(e,m)
confidence: "candidate only; no identity claim"
rule contextual_link:
if candidate_for(e,m) and corroborated_by_context(m,e) and not_conflicted(m,e)
then proposed_link(m,e)
confidence: "calibrated from independent evidence and model evaluation"
rule preserve_ambiguity:
if competing_candidates(m) and insufficient_disambiguation(m)
then unresolved(m)
confidence: "retain ranked alternatives"
SEMANTIC_EQUIVALENCE:
- "Map aliases to canonical identifiers using versioned authority records."
- "Keep exact identity, synonymy, similarity and broader/narrower mappings distinct."
- "Do not merge entities without independent identity evidence."
CONFIDENCE:
range: [0,1]
factors: [surface_match, context_compatibility, type_compatibility, authority_quality, independent_evidence, ambiguity]
policy: "Calibrate scores; abstain below an application-defined threshold; do not increase certainty solely by chaining."
VALIDATION:
- "Validate mention offsets, document IDs, entity IDs and link provenance."
- "Check type compatibility, temporal validity and conflicting identity claims."
- "Evaluate precision, recall, calibration and abstention on representative labelled data."
- "Keep unresolved or disputed links available for review."
FLOW_HASH:
algorithm: "SHA-256"
input: "canonicalised ontology version, mentions, entity references, links, rules and provenance"
note: "Compute hash at execution; no hash value is claimed here."
UPDATE_MODEL:
strategy: "versioned, provenance-preserving incremental relinking"
steps: [ingest, normalise, generate_candidates, rank, disambiguate, validate, reconcile, publish]
rollback: true
AI_CONSUMPTION:
representation: "typed knowledge graph with mention-to-entity links and evidence"
outputs: [canonical_entity_links, ranked_candidates, unresolved_mentions, confidence_annotations, provenance_records]
safeguards: [no_unsupported_identity_merges, preserve_ambiguity, retain_source_context, audit_link_changes]
}
END FLOW ALGEBRA
Download Code
Copy to Clipboard