FLOW ALGEBRA
Ontology: Semantic Metadata Ontology
Domain: Metadata Ontologies > Knowledge Metadata
Canonical URL: https://kirethresearch.org/booksai-core/ontologies/metadata-ontologies/knowledge-metadata/semantic-metadata-ontology.html
Authors: Mark Anthony Higgins — Sky (Recursive AI)
flow "SemanticMetadataOntology" v1.0
# ---------- DOMAIN ----------
domain:
class: MetadataOntology
category: KnowledgeMetadata
subject: SemanticMetadata
purpose:
- represent metadata describing meaning and semantic interpretation
- connect resources to concepts, ontologies, vocabularies, entities, and relationships
- support semantic disambiguation, integration, retrieval, and reasoning
- preserve context, mappings, provenance, confidence, and semantic constraints
- enable machine-readable interpretation across heterogeneous knowledge systems
# ---------- CORE ENTITY ----------
entity SemanticMetadata:
type: KnowledgeMetadata
describes: SemanticResource
may_include:
- semantic_identifier
- concept
- entity
- relationship
- ontology
- vocabulary
- semantic_type
- definition
- label
- context
- mapping
- equivalence
- constraint
- confidence
- provenance
- version
- language
entity SemanticResource:
type: Resource
may_be:
- DataResource
- KnowledgeResource
- Concept
- Entity
- RelationshipAssertion
- Document
- Dataset
- Observation
entity SemanticIdentifier:
type: Identifier
identifies: SemanticEntity
entity SemanticType:
type: Classification
classifies: SemanticResource
# ---------- RELATIONSHIPS ----------
relationships:
SemanticMetadata -> DESCRIBES -> SemanticResource
SemanticResource -> MAY_REFERENCE -> Concept
SemanticResource -> MAY_REFERENCE -> Entity
SemanticResource -> MAY_HAVE_TYPE -> SemanticType
SemanticResource -> MAY_REFERENCE -> Ontology
SemanticResource -> MAY_REFERENCE -> Vocabulary
SemanticResource -> MAY_HAVE_RELATIONSHIP -> RelationshipAssertion
SemanticResource -> MAY_HAVE_CONTEXT -> ContextMetadata
SemanticResource -> MAY_HAVE_MAPPING -> SemanticMapping
SemanticResource -> MAY_HAVE_CONSTRAINT -> SemanticConstraint
SemanticMetadata -> MAY_HAVE_CONFIDENCE -> Confidence
SemanticMetadata -> MAY_REFERENCE -> Provenance
# ---------- SEMANTIC IDENTITY ----------
rule semantic_identity:
semantic entities SHOULD use stable identifiers
where persistent machine interpretation is required
rule identifier_not_label:
SemanticIdentifier != Label
rule label_ambiguity:
identical lexical labels MUST NOT automatically imply identical semantic meaning
rule namespace:
identifier namespace SHOULD be preserved
where identifier is not globally unique
# ---------- CONCEPTS ----------
rule concept_reference:
SemanticResource MAY reference Concept
to express subject, meaning, category, or semantic role
rule concept_identifier:
concept identifier SHOULD be preferred over label-only reference
rule concept_context:
Concept meaning SHOULD be interpreted within vocabulary or ontology context
# ---------- ONTOLOGIES ----------
rule ontology_reference:
SemanticMetadata SHOULD reference Ontology
where formal semantics are defined by ontology
rule ontology_version:
ontology version SHOULD be preserved
where interpretation depends on specific revision
rule ontology_not_graph:
Ontology != KnowledgeGraph
# ---------- VOCABULARIES ----------
entity Vocabulary:
type: KnowledgeOrganisationSystem
contains:
- Concept
- Term
- Label
rule vocabulary:
Vocabulary MAY define controlled terms
without necessarily defining formal logical axioms
rule vocabulary_ontology_distinction:
Vocabulary != Ontology
unless system explicitly models vocabulary as ontology
# ---------- DEFINITIONS / LABELS ----------
entity SemanticDefinition:
type: MeaningDescription
defines: SemanticEntity
entity SemanticLabel:
type: LexicalRepresentation
may_be:
- preferred
- alternative
- hidden
- historical
rule definition:
definition SHOULD distinguish intended meaning
from nearby or homonymous concepts
rule multilingual:
labels and definitions SHOULD preserve language metadata
# ---------- SEMANTIC RELATIONSHIPS ----------
rule relationship:
SemanticResource MAY participate in typed semantic relationships
rule relationship_type:
relationship semantics SHOULD be identified by stable semantic identifier
rule direction:
directed relationship MUST preserve source and target
rule inverse:
inverse relationship MAY be inferred
only where ontology declares inverse semantics
# ---------- MAPPINGS ----------
entity SemanticMapping:
type: SemanticAlignment
connects:
- SourceSemanticEntity
- TargetSemanticEntity
may_include:
- mapping_type
- confidence
- context
- provenance
mapping_types:
- exact
- equivalent
- close
- broader
- narrower
- related
- transformation_required
rule exact_mapping:
exact mapping requires strong semantic equivalence evidence
rule lexical_mapping:
lexical similarity alone MUST NOT establish exact semantic equivalence
rule mapping_direction:
broader and narrower mappings MUST preserve direction
# ---------- SEMANTIC EQUIVALENCE ----------
entity SemanticEquivalence:
type: SemanticRelationship
may_be:
- exact_equivalence
- contextual_equivalence
- close_equivalence
rule exact_equivalence:
exact equivalence applies when semantic meaning is interchangeable
within declared scope
rule contextual_equivalence:
contextual equivalence MUST preserve context restrictions
rule close_equivalence:
close equivalence MUST NOT be treated as exact identity
# ---------- CONTEXT ----------
rule semantic_context:
meaning MAY depend on:
- domain
- task
- time
- location
- jurisdiction
- ontology
- vocabulary
- user_role
rule context_preservation:
context-dependent semantics MUST NOT be generalised beyond declared scope
# ---------- SEMANTIC CONSTRAINTS ----------
entity SemanticConstraint:
type: KnowledgeConstraint
may_include:
- domain_constraint
- range_constraint
- type_constraint
- cardinality_constraint
- vocabulary_constraint
- logical_constraint
rule constraint:
SemanticResource SHOULD satisfy applicable SemanticConstraints
rule semantic_validation:
syntactic validity != semantic validity
# ---------- ENTITY LINKING ----------
operation link_entity(resource, candidates):
evaluate:
- identifiers
- labels
- semantic_type
- context
- attributes
- relationships
- provenance
output:
- candidate_entities
- selected_entity_optional
- confidence
rule entity_linking:
entity link MUST NOT be established solely from label similarity
when ambiguity exists
# ---------- DISAMBIGUATION ----------
operation disambiguate(term, context):
evaluate:
- candidate_concepts
- candidate_entities
- domain
- ontology
- vocabulary
- surrounding_relationships
- temporal_context
- spatial_context
output:
- candidate_meanings
- selected_meaning_optional
- confidence
rule ambiguity:
unresolved ambiguity SHOULD preserve multiple candidate interpretations
# ---------- CONFIDENCE ----------
entity SemanticConfidence:
type: EpistemicMetadata
range: [0.0, 1.0]
rule confidence_bounds:
REQUIRE 0.0 <= confidence <= 1.0
rule confidence_scope:
confidence SHOULD identify whether it applies to:
- concept_mapping
- entity_link
- relationship
- interpretation
- equivalence
- inference
# ---------- PROVENANCE ----------
rule provenance:
SemanticMetadata SHOULD preserve:
- source
- creator
- extraction_method
- mapping_method
- reasoning_method
- timestamp
- revision_history
rule inferred_semantics:
inferred semantic interpretation MUST remain distinguishable
from explicitly asserted semantics
# ---------- VERSION ----------
entity SemanticMetadataVersion:
type: VersionMetadata
may_include:
- version_identifier
- predecessor
- successor
- creation_time
- change_description
rule semantic_change:
material semantic change SHOULD create distinguishable version
rule lexical_change:
lexical label change MAY preserve semantic identity
unless meaning changes
# ---------- VALIDATION ----------
validation:
require:
- identifiable_semantic_resource
validate_if_present:
- semantic_identifier
- concept
- entity
- semantic_type
- ontology
- vocabulary
- relationships
- mappings
- constraints
- context
- confidence
- provenance
reject:
- unresolved_identifier_namespace where deterministic interpretation is required
- unsupported_exact_equivalence
- domain_or_range_constraint_violation
- confidence_outside_valid_range
- context_dependent_mapping_applied_outside_scope
- ambiguous_label_presented_as certain identity
# ---------- SEMANTIC EQUIVALENCE ----------
SEMANTIC_EQUIVALENCE:
"semantic metadata" ~= "metadata about meaning"
"semantic annotation" ~= "semantic metadata assertion" WHEN annotation assigns meaning
"semantic mapping" ~= "semantic alignment"
"semantic identifier" ~= "meaning identifier" WHEN identifier resolves semantic entity
"entity linking" ~= "semantic entity resolution" WHEN linking resource mention to entity
PRESERVE distinctions:
semantic_metadata != content
label != concept
identifier != label
concept != entity
ontology != vocabulary
ontology != knowledge_graph
lexical_similarity != semantic_equivalence
close_equivalence != exact_equivalence
asserted_semantics != inferred_semantics
syntactic_validity != semantic_validity
# ---------- CONFIDENCE MODEL ----------
CONFIDENCE:
explicit_semantic_identifier:
score: 1.00
authoritative_ontology_mapping:
score: 0.98
context_resolved_entity_link:
score: 0.95
exact_mapping_with_strong_evidence:
score: 0.95
inferred_semantic_type:
score: 0.85
lexical_match:
score: <= 0.70
ambiguous_semantic_interpretation:
score: <= 0.60
action: preserve candidates
# ---------- UPDATE MODEL ----------
UPDATE_MODEL:
on_semantic_annotation:
- preserve resource identity
- attach semantic identifier
- record ontology or vocabulary
- assign confidence
- record provenance
on_mapping_change:
- preserve previous mapping
- validate new mapping type
- reassess dependent integrations
- update confidence
- record provenance
on_context_change:
- preserve previous context
- reassess semantic interpretation
- update candidate meanings
- preserve provenance
on_ontology_version_change:
- preserve previous ontology version
- reassess dependent semantic assertions
- identify changed meanings
- update provenance
# ---------- FLOW HASH ----------
FLOW_HASH:
inputs:
- ontology
- semantic_entities
- relationships
- identity_rules
- mapping_rules
- context_rules
- constraint_rules
- validation
- semantic_equivalence
- confidence_model
- update_model
canonicalisation:
- normalise_whitespace
- preserve_case_sensitive_identifiers
- sort_unordered_property_sets
- preserve_rule_order
output:
deterministic_semantic_hash
# ---------- AI CONSUMPTION ----------
AI_CONSUMPTION:
interpret_as:
- knowledge metadata ontology
- semantic interpretation model
- entity linking structure
- ontology alignment model
- semantic validation structure
operations:
- identify semantic resources
- resolve semantic identifiers
- resolve concepts and entities
- apply ontology and vocabulary context
- interpret semantic relationships
- evaluate semantic mappings
- disambiguate terms
- perform entity linking
- validate semantic constraints
- distinguish asserted and inferred semantics
- preserve provenance
- expose uncertainty
constraints:
- do_not_equate_label_with_concept
- do_not_equate_concept_with_entity
- do_not_force_exact_equivalence_from lexical_similarity
- do_not_apply_contextual_mapping_outside_scope
- do_not_present_inferred_semantics_as explicit_source_semantics
- preserve_identifiers_context_ontology_and_provenance
# ---------- QUERY MODEL ----------
query:
input:
- semantic_resource
- semantic_identifier
- label
- concept
- entity
- semantic_type
- ontology
- vocabulary
- relationship
- context
resolve:
1. identify SemanticResource
2. resolve SemanticIdentifier
3. resolve ontology and vocabulary
4. identify candidate Concepts and Entities
5. apply semantic type constraints
6. inspect relationships
7. apply context
8. evaluate mappings and equivalence
9. inspect provenance and confidence
10. return ranked interpretation
output:
- semantic_resource
- semantic_identifier
- concept
- entity
- semantic_type
- ontology
- vocabulary
- mappings
- context
- provenance
- confidence
# ---------- INFERENCE ----------
inference:
IF authoritative SemanticIdentifier resolves uniquely
THEN identify semantic entity
WITH confidence = 1.00
IF label and context uniquely resolve Concept
THEN infer concept mapping
WITH confidence >= 0.90
IF ontology defines inverse relationship
THEN infer inverse semantic relation
IF authoritative mapping declares exact equivalence
THEN infer interchangeable semantics within mapping scope
WITH confidence >= 0.95
IF multiple meanings remain plausible
THEN preserve candidate interpretations
AND do_not force resolution
# ---------- OUTPUT CONTRACT ----------
output:
ontology_entity: SemanticMetadata
semantic_structure: machine_interpretable
identifiers: stable_and_namespaced
concepts_and_entities: resolvable
ontology_context: preserved
mappings: typed
equivalence: scope_aware
constraints: machine_validatable
provenance: preserved
asserted_inferred_distinction: explicit
uncertainty: explicit
semantic_retrieval: enabled
end flow
Download Code
Copy to Clipboard