FLOW ALGEBRA
Annotation Ontology
Kireth Semantic Research Archive
PAGE:
https://kirethresearch.org/booksai-core/ontologies/metadata-ontologies/descriptive-metadata/annotation-ontology.html
AUTHORS:
Mark Anthony Higgins — Sky (Recursive AI)
FLOW "AnnotationOntology" v4.0
DOMAIN := MetadataOntologies
SUBDOMAIN := DescriptiveMetadata
ONTOLOGY := AnnotationOntology
ENTITY Annotation {
definition:
"A metadata statement, note, comment, label, explanation or semantic
assertion attached to a resource or a specific part of a resource to
provide additional description, interpretation, classification,
context or machine-readable knowledge.";
objectives: [
ResourceEnrichment,
ContextualDescription,
SemanticAssertion,
ReviewAndCommentary,
Classification,
KnowledgeLinking,
MachineInterpretability
];
}
AnnotationEntity := {
Annotation,
AnnotationBody,
AnnotationTarget,
Selector,
Motivation,
AnnotationCreator,
AnnotationIdentifier,
AnnotationSet
};
MetadataEntity := {
Resource,
MetadataRecord,
Language,
Timestamp,
Provenance,
Confidence,
Version
};
SemanticEntity := {
Comment,
Note,
Tag,
Classification,
EntityLink,
RelationshipAssertion,
ConceptReference
};
Annotation HAS_BODY AnnotationBody;
Annotation HAS_TARGET AnnotationTarget;
AnnotationTarget REFERENCES ResourceOrResourceFragment;
Selector IDENTIFIES TargetFragment;
AnnotationCreator CREATED Annotation;
Motivation EXPLAINS AnnotationPurpose;
Provenance SUPPORTS Annotation;
AnnotationSet CONTAINS Annotation;
AnnotationFlow :=
Resource
-> IdentifyAnnotationTarget
-> SelectTargetOrFragment
-> DetermineAnnotationMotivation
-> CreateOrExtractAnnotationBody
-> ResolveEntitiesAndConcepts
-> AttachCreatorTimestampAndProvenance
-> ValidateAnnotation
-> StoreAnnotation
-> LinkToMetadataAndKnowledgeGraph
-> IndexForDiscovery
-> MaintainAndVersion;
Annotation :=
StructuredOrUnstructuredMetadataAssociatedWithResourceOrFragment;
Annotation MAY_BE {
TextualAnnotation,
SemanticAnnotation,
TagAnnotation,
ClassificationAnnotation,
EntityAnnotation,
RelationshipAnnotation,
ReviewAnnotation
};
AnnotationBody :=
ContentOrSemanticAssertionProvidedByAnnotation;
AnnotationBody MAY_BE {
Text,
Tag,
Concept,
EntityReference,
Relationship,
StructuredData
};
AnnotationTarget :=
ResourceOrResourceFragmentBeingAnnotated;
Target MAY_BE {
WholeResource,
TextFragment,
ImageRegion,
AudioSegment,
VideoSegment,
DatasetCell,
GraphEntity
};
AnnotationStatement :=
Annotation
-> HAS_TARGET
-> AnnotationTarget;
Annotation
-> HAS_BODY
-> AnnotationBody;
AnnotationIdentifier :=
StableOrLocallyUniqueReferenceToAnnotation;
Annotation MAY_HAVE IndependentLifecycleFromTargetResource;
Selector :=
MechanismIdentifyingSpecificPartOfTargetResource;
Selector MAY_BE {
TextQuoteSelector,
TextPositionSelector,
FragmentSelector,
SpatialSelector,
TemporalSelector,
DataSelector
};
TextQuoteSelector :=
ExactOrContextualTextUsedToLocateTargetPassage;
TextPositionSelector :=
StartAndEndOffsetsIdentifyingTextRange;
SpatialSelector :=
CoordinatesOrRegionIdentifyingPartOfVisualResource;
TemporalSelector :=
TimeIntervalIdentifyingPartOfAudioOrVideo;
Selector SHOULD_BE RobustEnoughToResolveIntendedTarget;
ResourceRevision MAY_INVALIDATE PositionBasedSelector;
RobustAnnotationSystem MAY_PRESERVE {
OriginalSelector,
Context,
TargetVersion
};
Motivation :=
PurposeForCreatingAnnotation;
Motivation MAY_INCLUDE {
Describing,
Commenting,
Tagging,
Classifying,
Linking,
Highlighting,
Reviewing,
Correcting
};
TextualAnnotation :=
HumanReadableNoteOrCommentAssociatedWithTarget;
SemanticAnnotation :=
MachineInterpretableAssertionLinkingTargetToEntityConceptPropertyOrRelationship;
TagAnnotation :=
AnnotationWhoseBodyIsTagOrKeyword;
ClassificationAnnotation :=
AnnotationAssigningTargetToCategoryClassOrSubject;
EntityAnnotation :=
AnnotationLinkingTargetMentionOrFragmentToCanonicalEntity;
RelationshipAnnotation :=
AnnotationAssertingTypedRelationshipBetweenEntitiesOrTargets;
ReviewAnnotation :=
AnnotationContainingEvaluationFeedbackOrCommentary;
CorrectionAnnotation :=
AnnotationProposingOrRecordingCorrectionToTargetOrMetadata;
HighlightAnnotation :=
AnnotationIdentifyingTargetFragmentWithoutNecessarilyAddingLongTextBody;
AnnotationCreator :=
AgentResponsibleForAnnotation;
AnnotationCreator MAY_BE {
Person,
Organisation,
SoftwareSystem,
AIModel
};
HumanAnnotation :=
AnnotationCreatedOrApprovedByHumanAgent;
AutomaticAnnotation :=
AnnotationGeneratedBySoftware;
AIGeneratedAnnotation :=
AnnotationSuggestedOrGeneratedByAIModel;
AIGeneratedAnnotation SHOULD_HAVE {
ModelVersion,
GenerationMethod,
Confidence,
ValidationStatus
};
AnnotationLanguage :=
LanguageOfTextualAnnotationBody;
AnnotationLanguage MAY_DIFFER_FROM TargetResourceLanguage;
AnnotationTimestamp MAY_INCLUDE {
CreatedAt,
ModifiedAt,
PublishedAt
};
AnnotationProvenance MAY_INCLUDE {
Creator,
Source,
Method,
Timestamp,
ModelVersion
};
AnnotationConfidence :=
EstimatedSupportForSemanticOrAutomaticallyGeneratedAnnotation;
AnnotationStatus MAY_BE {
Draft,
Proposed,
Approved,
Rejected,
Deprecated,
Archived
};
ProposedAnnotation SHOULD_NOT AutomaticallyBeTreatedAsAuthoritative;
ApprovedAnnotation :=
AnnotationAcceptedAccordingToGovernancePolicy;
AnnotationVersion :=
IdentifiedRevisionOfAnnotation;
AnnotationHistory MAY_PRESERVE {
PreviousBody,
PreviousTarget,
PreviousStatus,
ChangeReason
};
AnnotationChange MAY_INCLUDE {
EditBody,
ChangeTarget,
ChangeConceptLink,
ChangeStatus,
AddProvenance
};
AnnotationValidation MAY_CHECK {
TargetExists,
SelectorResolves,
BodyDatatype,
IdentifierValidity,
LanguageTag,
ConceptReference
};
IF TargetCannotBeResolved
THEN AnnotationStatus MAY_BE orphaned_or_invalid;
OrphanAnnotation :=
AnnotationWhoseIntendedTargetCanNoLongerBeResolved;
OrphanRecovery MAY_USE {
TargetVersion,
TextContext,
StableIdentifier,
ContentFingerprint
};
AnnotationAccuracy :=
DegreeToWhichAnnotationCorrectlyDescribesOrLinksTarget;
AnnotationRelevance :=
DegreeToWhichAnnotationIsPertinentToTargetAndMotivation;
AnnotationSpecificity :=
DegreeToWhichAnnotationPreciselyTargetsAndDescribesRelevantResourcePart;
AnnotationQuality MAY_INCLUDE {
Accuracy,
Relevance,
Specificity,
Provenance,
TargetResolution
};
AnnotationConflict :=
MultipleAnnotationsProvideIncompatibleAssertionsAboutSameTargetAndContext;
ConflictHandling MAY {
PreserveAllAnnotations,
CompareAuthority,
RankConfidence,
FlagReview
};
MultipleAnnotations MAY_CoexistWithoutConflictWhenTheyRepresentDifferentPerspectivesOrPurposes;
AnnotationSet :=
ManagedCollectionOfAnnotations;
AnnotationSet MAY_HAVE {
Identifier,
Creator,
Purpose,
Version,
AccessPolicy
};
AnnotationLayer :=
LogicalGroupingOfAnnotationsByPurposeSourceOrType;
Layers MAY_INCLUDE {
HumanReviewLayer,
AIAnnotationLayer,
EntityLinkingLayer,
ClassificationLayer
};
Annotation MAY_REFERENCE ControlledVocabularyTerm;
SemanticAnnotation MAY_REFERENCE OntologyConcept;
EntityAnnotation MAY_REFERENCE KnowledgeGraphEntity;
RelationshipAnnotation MAY_HAVE {
SubjectEntity,
Predicate,
ObjectEntity
};
SemanticTripleAnnotation :=
Subject
-> Predicate
-> Object;
Annotation MAY_ADD KnowledgeWithoutModifyingUnderlyingResource;
Annotation SHOULD_NOT BeConfusedWithOriginalResourceContent;
MetadataRecord MAY_CONTAIN AnnotationMetadataOrReferences;
Annotation MAY_ITSELF_HAVE Metadata;
MetadataAboutAnnotation MAY_INCLUDE {
Creator,
Date,
Language,
Rights,
Provenance
};
AnnotationIndex :=
SearchStructureMappingAnnotationsTargetsConceptsAndEntities;
AnnotationIndex MAY_SUPPORT {
FullTextSearch,
EntitySearch,
ConceptSearch,
TargetLookup
};
AnnotationSearch :=
Query
-> MatchAnnotationBodyOrSemanticLinks
-> ResolveTarget
-> ReturnAnnotationAndResource;
SemanticSearch MAY_USE AnnotationFor {
EntityResolution,
ConceptMatching,
QueryExpansion,
Ranking,
ContextEnrichment
};
Annotation MAY_BE ConvertedTo EmbeddingForSimilaritySearch;
VectorSimilarity MAY_SUPPORT AnnotationDiscovery
BUT DoesNotEstablish SemanticAssertionTruth;
KnowledgeGraph MAY_REPRESENT AnnotationAsNodeOrReifiedStatement;
Annotation MAY_LINK {
Resource,
Entity,
Concept,
Relationship,
Evidence
};
EvidenceAnnotation :=
AnnotationConnectingClaimOrAssertionToSupportingResourceFragment;
Evidence MAY_IMPROVE ExplainabilityAndProvenance;
Annotation MAY_SUPPORT TrainingOrEvaluationDataForAI;
TrainingAnnotation MAY_INCLUDE {
Label,
Span,
Entity,
Relation,
Class
};
GoldAnnotation :=
AnnotationAcceptedAsReferenceStandardForEvaluation;
SilverAnnotation :=
AnnotationGeneratedOrWeaklySupervisedWithLowerAuthorityThanGoldReference;
InterAnnotatorAgreement :=
MeasureOfConsistencyAcrossIndependentHumanAnnotations;
LowAgreement MAY_INDICATE AmbiguousGuidelinesOrTask;
AnnotationGuideline :=
RulesDefiningHowAnnotatorsShouldCreateAnnotations;
ConsistentGuidelines MAY_IMPROVE AnnotationQuality;
MetadataSchema MAY_DEFINE AnnotationPropertiesAndConstraints;
WebAnnotationModel MAY_REPRESENT {
Annotation,
Body,
Target,
Motivation,
Selector
};
RDF MAY_REPRESENT AnnotationRelationshipsAsSemanticStatements;
JSONLD MAY_SERIALISE LinkedAnnotationsAndTargets;
MetadataRepository MAY_STORE AnnotationObjects;
MetadataRegistry MAY_REGISTER AnnotationPropertiesMotivationsAndVocabularies;
MetadataCatalogue MAY_USE AnnotationsForResourceEnrichment;
AnnotationInteroperability MAY_REQUIRE {
StableIdentifiers,
SharedTargetModel,
SharedMotivationVocabulary,
SemanticMappings
};
AnnotationCrosswalk :=
MappingBetweenAnnotationModelsOrLabelSchemes;
AI MAY_USE AnnotationFor {
SupervisedLearning,
Retrieval,
EntityLinking,
Classification,
Evaluation,
Explainability
};
AIAnnotation :=
ResourceOrFragment
-> ModelAnalysis
-> CandidateAnnotation
-> Confidence
-> Validation
-> ApprovedOrRejectedAnnotation;
RetrievalAugmentedGeneration MAY_USE AnnotationFor {
EvidenceSelection,
ContextEnrichment,
EntityLinking,
SourceExplanation
};
Annotation MAY_CONTAIN SensitivePersonalOrConfidentialInformation;
PrivacyPolicy SHOULD_APPLY_TO AnnotationBodyTargetAndDerivedLinks;
AnnotationAccessControl MAY_APPLY_TO {
Annotation,
AnnotationSet,
Body,
TargetReference
};
AnnotationSecurity MAY_INCLUDE {
InputValidation,
OutputEscaping,
AccessControl,
ProvenanceIntegrity,
ChangeAuthorisation
};
MachineReadableAnnotation SHOULD_PRESERVE {
AnnotationIdentifier,
Body,
Target,
Selector,
Motivation,
Creator,
Provenance,
Confidence
};
# ---------- SEMANTIC REASONING ----------
IF MetadataStatementIsAttachedToResourceOrSpecificResourceFragment
AND ProvidesAdditionalDescriptionInterpretationOrSemanticAssertion
THEN AnnotationClassification := supported;
IF AnnotationTargetIsFragment
THEN Selector SHOULD_BE Preserved;
IF ResourceVersionChanges
THEN FragmentSelector SHOULD_BE Revalidated;
IF SemanticAnnotationReferencesCanonicalConcept
THEN ConceptIdentifier SHOULD_BE PreservedForMachineLinking;
IF AIGeneratedAnnotationConfidenceLow
THEN AutomaticAuthoritativeAcceptance SHOULD_BE Restricted;
IF AnnotationConflictsWithAnotherAnnotation
THEN Both MAY_BE PreservedWithProvenanceAndConfidence;
IF AnnotationTargetCannotBeResolved
THEN Annotation SHOULD_BE FlaggedForRecoveryOrReview;
# ---------- SEMANTIC EQUIVALENCE ----------
SEMANTIC_EQUIVALENCE {
"annotation" ~= "resource annotation" WHEN metadata_context;
"semantic annotation" ~= "machine-interpretable annotation";
"textual annotation" ~= "annotation note";
"entity annotation" ~= "entity linking annotation";
"classification annotation" ~= "label annotation" WHEN classification_context;
"annotation target" ~= "annotated resource or fragment";
"annotation body" ~= "annotation content";
"annotation set" ~= "annotation collection";
}
# ---------- QUERY FLOW ----------
QUERY(q) ->
NORMALISE(q) ->
IDENTIFY_ANNOTATION(q) ->
IDENTIFY_TARGET_RESOURCE_OR_FRAGMENT(q) ->
RESOLVE_SELECTOR(q) ->
IDENTIFY_ANNOTATION_BODY(q) ->
IDENTIFY_MOTIVATION_AND_TYPE(q) ->
RESOLVE_ENTITIES_AND_CONCEPTS(q) ->
IDENTIFY_CREATOR_PROVENANCE_AND_STATUS(q) ->
VALIDATE_ANNOTATION(q) ->
SCORE_CONFIDENCE(q) ->
RETURN_RELEVANT_ANNOTATION_KNOWLEDGE;
# ---------- CONFIDENCE ----------
CONFIDENCE(assertion) :=
weighted_mean(
source_reliability,
annotation_accuracy,
target_resolution_strength,
semantic_link_strength,
provenance_quality,
contextual_relevance
);
CONFIDENCE >= 0.90 => HIGH;
CONFIDENCE >= 0.70 AND < 0.90 => MODERATE;
CONFIDENCE < 0.70 => REVIEW;
# ---------- AI CONSUMPTION ----------
AI_CONSUMPTION {
primary_entity: Annotation;
ontology: AnnotationOntology;
parse_entities: true;
parse_relationships: true;
preserve_relationship_direction: true;
resolve_semantic_equivalence: true;
execute_reasoning_rules: true;
apply_confidence_weighting: true;
preserve_provenance: true;
}
# ---------- UPDATE MODEL ----------
UPDATE_MODEL {
new_annotation:
identify_target
-> create_or_resolve_selector
-> classify_motivation
-> create_body
-> resolve_entities_and_concepts
-> attach_creator
-> attach_provenance
-> assign_confidence
-> validate
-> integrate;
annotation_revision:
preserve_previous_version
-> apply_changes
-> revalidate_target_and_selector
-> update_index
-> recompute_confidence
-> regenerate_flow_hash;
target_revision:
identify_affected_annotations
-> revalidate_selectors
-> recover_targets_where_possible
-> flag_orphans
-> integrate;
conflict:
preserve_all_annotation_provenance
-> compare_assertions
-> assess_authority_and_confidence
-> flag_review;
}
# ---------- FLOW HASH ----------
FLOW_HASH_INPUT :=
DOMAIN
+ SUBDOMAIN
+ ONTOLOGY
+ AnnotationEntity
+ MetadataEntity
+ SemanticEntity
+ Annotation
+ AnnotationTarget
+ SemanticAnnotation
+ RELATIONSHIPS
+ SEMANTIC_REASONING
+ SEMANTIC_EQUIVALENCE
+ UPDATE_MODEL;
FLOW_HASH :=
HASH(FLOW_HASH_INPUT);
# ---------- TERMINAL ----------
AnnotationOntology
-> IdentifyResourceOrFragmentTarget
-> ResolveSelectorAndTargetVersion
-> DetermineAnnotationMotivation
-> CreateTextualOrSemanticAnnotationBody
-> ResolveCanonicalEntitiesConceptsAndRelationships
-> AttachCreatorTimestampProvenanceAndConfidence
-> ValidateTargetBodyAndSemanticLinks
-> StoreAndVersionAnnotation
-> IndexForSearchAndResourceEnrichment
-> LinkAnnotationsToKnowledgeGraphAndEvidence
-> EnforcePrivacySecurityAndAccess
-> SupportAITrainingRetrievalAndExplainability
-> MaintainReliableAnnotationKnowledge;
END FLOW
Download Code
Copy to Clipboard