FLOW ALGEBRA
Section Ontology
Kireth Semantic Research Archive
PAGE:
https://kirethresearch.org/booksai-core/ontologies/metadata-ontologies/structural-metadata/section-ontology.html
AUTHORS:
Mark Anthony Higgins — Sky (Recursive AI)
FLOW "SectionOntology" v4.0
DOMAIN := MetadataOntologies
SUBDOMAIN := StructuralMetadata
ONTOLOGY := SectionOntology
ENTITY Section {
definition:
"A logical structural division of a document, chapter or other
information resource, identified by its boundary, heading, position,
parent component, subordinate content and relationships to adjacent
or related sections.";
objectives: [
LogicalSegmentation,
HierarchicalOrganisation,
Navigation,
ReadingOrder,
FragmentAddressing,
RetrievalContext,
MachineInterpretability
];
}
SectionEntity := {
Section,
Document,
Chapter,
SectionTitle,
SectionIdentifier,
SectionNumber,
SectionContent,
Subsection
};
StructuralEntity := {
ParentComponent,
PreviousSection,
NextSection,
ChildSection,
Sequence,
Position,
StructureMap,
Fragment
};
MetadataEntity := {
MetadataRecord,
ResourceIdentifier,
Language,
Provenance,
Version,
Confidence
};
Section IS_PART_OF ParentComponent;
ParentComponent HAS_PART Section;
Section MAY_CONTAIN Subsection;
Section MAY_PRECEDE Section;
Section MAY_FOLLOW Section;
Section HAS SectionIdentifier;
Section MAY_HAVE SectionTitle;
Section HAS Position;
SectionFlow :=
ParentDocumentOrChapter
-> IdentifySectionBoundary
-> AssignSectionIdentifier
-> DetermineSectionLevelAndPosition
-> CaptureSectionTitle
-> IdentifySubsectionsAndContent
-> LinkPreviousAndNextSections
-> AttachParentComponent
-> ValidateSectionStructure
-> StoreStructuralMetadata
-> IndexForNavigationAndRetrieval
-> MaintainAcrossVersions;
Section :=
LogicalDivisionWithinDocumentChapterOrOtherStructuredResource;
ParentComponent MAY_BE {
Document,
Chapter,
Section
};
Section MAY_BE {
TopLevelSection,
NestedSection,
NumberedSection,
UnnumberedSection
};
SectionIdentifier :=
StableOrLocallyUniqueReferenceToSection;
SectionIdentifier MAY_BE {
URI,
IRI,
UUID,
FragmentIdentifier,
InternalID
};
StableSectionIdentifier SHOULD_BE PreferredOverSectionNumberForMachineLinking;
SectionNumber :=
HumanReadableOrStructuralOrdinalAssignedToSection;
SectionNumber MAY_BE {
Integer,
Decimal,
HierarchicalNumber,
AlphanumericLabel
};
SectionNumber != SectionIdentifierByDefinition;
SectionLevel :=
HierarchicalDepthOrHeadingLevelOfSectionWithinParentStructure;
SectionPosition :=
OrderedLocationOfSectionAmongSiblingSections;
SectionTitle :=
HumanReadableHeadingOrNameOfSection;
SectionTitle MAY_HAVE {
PreferredTitle,
AlternativeTitle,
Language
};
UntitledSection MAY_EXISTAccordingToDocumentModel;
SectionContent :=
ContentContainedWithinSectionBoundary;
SectionContent MAY_INCLUDE {
Paragraph,
Subsection,
Figure,
Table,
List,
Citation,
Footnote,
Fragment
};
Subsection :=
SectionWhoseParentIsAnotherSection;
ChildSection :=
ImmediateSubsectionOfParentSection;
ParentSection :=
ImmediateContainingSectionOfChildSection;
SectionHierarchy :=
Document
-> OptionalChapter
-> Section
-> Subsection
-> NestedSubsection
-> Fragment;
SectionPath :=
RootDocument
-> OptionalChapter
-> ParentSections
-> TargetSection;
IF ParentComponent HAS_PART Section
THEN Section IS_PART_OF ParentComponent;
IF SectionA CONTAINS SectionB
THEN SectionB IS_SUBSECTION_OF SectionA;
Containment MAY_BE Transitive;
IF A CONTAINS B
AND B CONTAINS C
AND containment_is_transitive
THEN A CONTAINS C;
SectionSequence :=
OrderedCollectionOfSiblingSections;
ReadingOrder :=
IntendedSequenceForConsumingSections;
PreviousSection :=
ImmediateSiblingSectionBeforeCurrentSection;
NextSection :=
ImmediateSiblingSectionAfterCurrentSection;
IF SectionA PRECEDES SectionB
THEN SectionB FOLLOWS SectionA;
IF NoSiblingSectionExistsBetweenAAndB
AND A PRECEDES B
THEN A MAY_BE PreviousSectionOf B;
SectionBoundary :=
StartAndEndExtentOfSectionWithinResourceRepresentation;
Boundary MAY_BE IdentifiedBy {
Markup,
Heading,
TextOffsets,
PageRange,
StructuralParser
};
Section MAY_SPAN MultiplePages;
PageRange MAY_DESCRIBE PhysicalExtentOfSection;
LogicalSection MAY_DIFFER_FROM PhysicalPageBoundary;
SectionToPageMapping :=
Section
-> OneOrMorePages;
SectionFragment :=
AddressableSubpartOfSection;
Fragment MAY_BE {
Paragraph,
TextSpan,
Figure,
Table,
ListItem
};
SectionStructureMap :=
ExplicitRepresentationOfSectionAndContainedComponents;
StructureMap MAY_INCLUDE {
SectionIdentifier,
Title,
Level,
Position,
ChildSections,
References
};
TableOfContents MAY_REFERENCE SectionIdentifierAndTitle;
SectionHeading :=
HeadingRepresentingSectionBoundaryOrTitle;
HeadingLevel SHOULD_CORRESPOND_TO StructuralLevelAccordingToProfile;
SkippedHeadingLevel MAY_REQUIRE ReviewInStrictDocumentProfiles;
CrossReference MAY_TARGET SectionOrSectionFragment;
SectionStructuralValidation MAY_CHECK {
ParentComponent,
Identifier,
HierarchicalLevel,
DuplicatePosition,
Boundary,
ReadingOrder,
BrokenReference
};
IF SectionHasNoResolvableParent
AND SectionIsNotDefinedAsTopLevel
THEN Section MAY_BE OrphanSection;
OrphanSection :=
SectionExpectedWithinStructureButWithoutResolvableParentRelationship;
IF DuplicateSectionIdentifierWithinUniqueScope
THEN IdentifierValidation := violation;
IF TwoSiblingSectionsOccupySameExclusivePosition
THEN ReadingOrderConflict MAY_EXIST;
IF SectionContainsItselfDirectlyOrTransitively
THEN HierarchicalCycle := true;
IF HierarchicalCycle
THEN ValidationStatus := violation;
SectionCompleteness :=
DegreeToWhichRequiredSectionStructuralMetadataIsPresent;
SectionConsistency :=
DegreeToWhichSectionLevelPositionHierarchyAndReferencesAgree;
SectionIntegrity :=
PreservationOfValidIdentifierBoundaryRelationshipsAndOrder;
SectionQuality MAY_INCLUDE {
Completeness,
Consistency,
Integrity,
Navigability,
IdentifierStability
};
SectionProvenance MAY_INCLUDE {
Source,
Creator,
ExtractionMethod,
Timestamp,
Version
};
Section MAY_BE {
ManuallyAuthored,
ExtractedFromMarkup,
AutomaticallyDetected,
AIAssisted
};
AutomaticSectionDetection :=
Resource
-> DetectHeadingsAndBoundaries
-> InferHierarchy
-> InferSequence
-> GenerateSectionMetadata;
AI MAY_SUPPORT {
SectionBoundaryDetection,
HeadingExtraction,
HierarchyInference,
ReadingOrderInference
};
InferredSection SHOULD_HAVE ConfidenceWhereDetectionIsUncertain;
SectionConfidence :=
EstimatedSupportForInferredSectionStructureOrMetadata;
SectionVersion :=
SectionStateAssociatedWithSpecificParentResourceVersion;
ResourceRevision MAY {
AddSection,
RemoveSection,
ReorderSection,
RenameSection,
ReparentSection,
SplitSection,
MergeSections
};
ReorderSection :=
MoveSectionToDifferentSiblingPosition;
RenameSection :=
ChangeSectionTitleWithoutNecessarilyChangingSectionIdentity;
ReparentSection :=
MoveSectionToDifferentParentComponent;
SplitSection :=
ExistingSection
-> MultipleNewSections;
MergeSections :=
MultipleExistingSections
-> SingleSection;
StableSectionIdentifier MAY_BE PreservedAcrossRenameOrReorder;
Reparent MAY_PreserveIdentifierIfSemanticIdentityContinuesAccordingToPolicy;
SplitOrMerge MAY_REQUIRE IdentifierMappingAndMigration;
SectionVersionMapping :=
OldSectionIdentifier
-> NewSectionIdentifierOrIdentifiers;
SectionAnnotation MAY_TARGET SectionOrFragment;
StableSectionIdentifier MAY_IMPROVE AnnotationPersistence;
Citation MAY_REFERENCE SpecificSectionWithinLargerDocument;
Section MAY_HAVE DescriptiveMetadataSuchAs {
Title,
Subject,
Summary,
Keywords,
Language
};
StructuralMetadata DEFINES SectionPositionHierarchyAndContainment;
DescriptiveMetadata DESCRIBES SectionContentAndIdentity;
TechnicalMetadata MAY_DESCRIBE FilesOrMarkupContainingSection;
PreservationMetadata MAY_USE SectionStructureForLongTermInterpretation;
SectionIndex :=
SearchStructureMappingSectionMetadataAndContentToParentResource;
SectionIndex MAY_INCLUDE {
SectionTitle,
SectionIdentifier,
ParentIdentifier,
Position,
FullText
};
SectionSearch :=
Query
-> MatchSectionMetadataOrContent
-> ReturnSectionWithParentContext;
SemanticSearch MAY_USE SectionFor {
ScopedRetrieval,
ParentContext,
NeighbourRetrieval,
Ranking
};
IF SearchMatchOccursWithinSection
THEN Result SHOULD_PRESERVE ParentDocumentChapterAndSectionContextWhereUseful;
RAG MAY_USE SectionAs {
RetrievalUnit,
ChunkBoundary,
ContextContainer
};
StructureAwareChunking MAY_SPLIT SectionIntoParagraphsOrFragments
WHILE Preserving SectionIdentifierAndPath;
NeighbourRetrieval MAY_USE PreviousSectionAndNextSectionRelationships;
KnowledgeGraph MAY_REPRESENT SectionAsNode;
GraphRelationships MAY_INCLUDE {
IS_PART_OF,
HAS_PART,
PRECEDES,
FOLLOWS,
REFERENCES
};
MetadataRepository MAY_STORE SectionStructuralMetadata;
MetadataRegistry MAY_REGISTER SectionPropertiesAndRelationshipTypes;
SectionInteroperability MAY_REQUIRE {
StableIdentifiers,
SharedStructuralSemantics,
ParentReference,
VersionInformation
};
RDF MAY_REPRESENT:
Section
-> isPartOf
-> ParentComponent;
JSONLD MAY_SERIALISE SectionAndStructuralRelationships;
HTML MAY_REPRESENT SectionsUsing SectioningElementsAndHeadings;
XML MAY_REPRESENT SectionAsExplicitNestedElement;
Accessibility MAY_USE SectionHeadingsAndHierarchyForNavigation;
CorrectHeadingLevels MAY_IMPROVE ScreenReaderAndKeyboardNavigation;
SectionAccessControl MAY_DIFFER_FROM ParentResourceAccessInSomeSystems;
RestrictedSection MUST_NOT_BE ExposedToUnauthorisedConsumer;
SectionSecurity MAY_INCLUDE {
IdentifierValidation,
AccessControl,
ReferenceIntegrity,
ProvenanceIntegrity,
ChangeAuthorisation
};
MachineReadableSection SHOULD_PRESERVE {
SectionIdentifier,
ParentIdentifier,
Title,
Level,
Position,
ChildSections,
ReadingOrder,
Version,
Provenance
};
# ---------- SEMANTIC REASONING ----------
IF ResourceComponentIsLogicalDivisionWithinDocumentChapterOrSection
THEN SectionClassification := supported;
IF ParentComponent HAS_PART Section
THEN Section IS_PART_OF ParentComponent;
IF SectionA PRECEDES SectionB
THEN SectionB FOLLOWS SectionA;
IF SectionA CONTAINS SectionB
THEN SectionB IS_SUBSECTION_OF SectionA;
IF SectionIdentifierStableAcrossRename
THEN ExistingLinks MAY_REMAIN Valid;
IF SectionPositionChanges
THEN PreviousNextRelationships SHOULD_BE Recomputed;
IF SectionReparented
THEN StructuralPath SHOULD_BE Recomputed;
IF SectionSplitOccurs
THEN OldIdentifier SHOULD_BE MappedToSuccessorSectionsWherePossible;
# ---------- SEMANTIC EQUIVALENCE ----------
SEMANTIC_EQUIVALENCE {
"section" ~= "document section" WHEN structural_context;
"section identifier" ~= "section ID";
"section number" ~= "section ordinal" WHEN sequence_context;
"section title" ~= "section heading" WHEN heading_is_title;
"subsection" ~= "child section";
"section sequence" ~= "section reading order" WHEN sibling_linear_context;
"section path" ~= "document hierarchy path to section";
"parent component" ~= "containing document component";
}
# ---------- QUERY FLOW ----------
QUERY(q) ->
NORMALISE(q) ->
IDENTIFY_PARENT_RESOURCE(q) ->
IDENTIFY_SECTION(q) ->
RESOLVE_SECTION_IDENTIFIER(q) ->
IDENTIFY_TITLE_LEVEL_NUMBER_AND_POSITION(q) ->
IDENTIFY_CHILD_SECTIONS_AND_FRAGMENTS(q) ->
IDENTIFY_PREVIOUS_NEXT_RELATIONSHIPS(q) ->
IDENTIFY_VERSION_AND_PROVENANCE(q) ->
VALIDATE_SECTION_STRUCTURE(q) ->
SCORE_CONFIDENCE(q) ->
RETURN_RELEVANT_SECTION_KNOWLEDGE;
# ---------- CONFIDENCE ----------
CONFIDENCE(assertion) :=
weighted_mean(
source_reliability,
section_structure_consistency,
identifier_strength,
boundary_evidence,
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: Section;
ontology: SectionOntology;
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_section:
identify_parent_resource
-> detect_or_receive_boundary
-> assign_section_identifier
-> determine_level_and_position
-> capture_title
-> identify_child_sections
-> attach_provenance
-> validate
-> integrate;
section_revision:
preserve_previous_version
-> apply_title_boundary_level_or_content_changes
-> preserve_identifier_where_identity_continues
-> recompute_sequence_relationships
-> revalidate
-> update_index
-> recompute_confidence
-> regenerate_flow_hash;
resource_revision:
identify_affected_sections
-> update_positions_parent_links_and_paths
-> map_changed_identifiers
-> validate_structure
-> integrate;
conflict:
preserve_provenance
-> compare_section_boundaries_levels_positions_or_sources
-> adjust_confidence
-> flag_review;
}
# ---------- FLOW HASH ----------
FLOW_HASH_INPUT :=
DOMAIN
+ SUBDOMAIN
+ ONTOLOGY
+ SectionEntity
+ StructuralEntity
+ MetadataEntity
+ Section
+ SectionHierarchy
+ SectionStructureMap
+ RELATIONSHIPS
+ SEMANTIC_REASONING
+ SEMANTIC_EQUIVALENCE
+ UPDATE_MODEL;
FLOW_HASH :=
HASH(FLOW_HASH_INPUT);
# ---------- TERMINAL ----------
SectionOntology
-> IdentifyParentDocumentChapterOrSection
-> DetectSectionBoundaryAndIdentity
-> AssignStableSectionIdentifier
-> CaptureSectionLevelNumberTitleAndPosition
-> ModelChildSectionsAndFragments
-> EstablishPreviousAndNextRelationships
-> MapSectionToPagesFilesAndParentPath
-> ValidateHierarchyBoundaryAndReadingOrder
-> StoreAndVersionSectionMetadata
-> IndexForNavigationSearchAndRetrieval
-> PreserveStructuralContextForRAGAndSemanticSearch
-> MaintainCrossVersionSectionMappings
-> MaintainReliableSectionStructureKnowledge;
END FLOW
Download Code
Copy to Clipboard