FLOW ALGEBRA
Page Ontology
Kireth Semantic Research Archive
PAGE:
https://kirethresearch.org/booksai-core/ontologies/metadata-ontologies/structural-metadata/page-ontology.html
AUTHORS:
Mark Anthony Higgins — Sky (Recursive AI)
FLOW "PageOntology" v4.0
DOMAIN := MetadataOntologies
SUBDOMAIN := StructuralMetadata
ONTOLOGY := PageOntology
ENTITY Page {
definition:
"A physical, rendered or logical unit within a document or compound
resource, identified by its position, label, boundaries, parent
resource, content and relationships to preceding and following pages.";
objectives: [
PhysicalStructureRepresentation,
PageIdentification,
SequenceModelling,
Navigation,
FragmentAddressing,
DocumentReconstruction,
MachineInterpretability
];
}
PageEntity := {
Page,
Document,
PageIdentifier,
PageNumber,
PageLabel,
PageContent,
PageRegion,
PageSequence
};
StructuralEntity := {
ParentDocument,
PreviousPage,
NextPage,
Position,
Sequence,
PageRange,
StructureMap,
Fragment
};
MetadataEntity := {
MetadataRecord,
ResourceIdentifier,
PageType,
Provenance,
Version,
Confidence
};
Page IS_PART_OF Document;
Document HAS_PART Page;
Page MAY_PRECEDE Page;
Page MAY_FOLLOW Page;
Page HAS PageIdentifier;
Page MAY_HAVE PageNumber;
Page MAY_HAVE PageLabel;
Page HAS Position;
PageFlow :=
Document
-> IdentifyPages
-> AssignPageIdentifiers
-> DeterminePageNumbersAndLabels
-> EstablishPageSequence
-> LinkPreviousAndNextPages
-> IdentifyPageContentAndRegions
-> MapLogicalComponentsToPages
-> ValidatePageStructure
-> StoreStructuralMetadata
-> EnableNavigationAndRetrieval
-> MaintainAcrossVersions;
Page :=
PhysicalRenderedOrLogicalUnitOfDocumentLikeResource;
Document :=
ParentResourceContainingOrRepresentedByPages;
Page MAY_BE {
ContentPage,
FrontMatterPage,
BackMatterPage,
CoverPage,
BlankPage,
InsertPage
};
PageIdentifier :=
StableOrLocallyUniqueMachineReferenceToPage;
PageIdentifier MAY_BE {
URI,
IRI,
UUID,
FragmentIdentifier,
InternalID
};
PageNumber :=
HumanReadableOrdinalOrNumberAssignedToPage;
PageNumber MAY_BE {
ArabicNumber,
RomanNumeral,
AlphanumericNumber,
Unnumbered
};
PageLabel :=
DisplayLabelAssociatedWithPage;
PageLabel MAY_DIFFER_FROM PageNumber;
PageIdentifier != PageNumberByDefinition;
StablePageIdentifier SHOULD_BE PreferredForMachineLinking;
PagePosition :=
OrderedLocationOfPageWithinPageSequence;
PageSequence :=
OrderedCollectionOfPagesWithinDocumentOrVolume;
PageSequence MAY_DEFINE {
FirstPage,
PreviousPage,
CurrentPage,
NextPage,
LastPage
};
PreviousPage :=
ImmediatePageBeforeCurrentPageInDefinedSequence;
NextPage :=
ImmediatePageAfterCurrentPageInDefinedSequence;
IF PageA PRECEDES PageB
THEN PageB FOLLOWS PageA;
IF NoPageExistsBetweenAAndB
AND A PRECEDES B
THEN A MAY_BE PreviousPageOf B;
ReadingOrder MAY_FOLLOW PageSequence
BUT ComplexDocuments MAY_HAVE AdditionalWithinPageReadingOrder;
PhysicalPageOrder MAY_DIFFER_FROM PrintedPageNumbering;
Example:
CoverPage -> Position 1
TitlePage -> Position 2
PageLabel "i" -> Position 3;
PageBoundary :=
SpatialOrStructuralExtentOfPageRepresentation;
DigitalPage MAY_HAVE {
Width,
Height,
Orientation,
CoordinateSystem
};
PageRegion :=
AddressableSpatialAreaWithinPage;
PageRegion MAY_BE {
TextRegion,
ImageRegion,
HeaderRegion,
FooterRegion,
MarginRegion,
TableRegion
};
SpatialSelector :=
CoordinatesOrGeometryIdentifyingPageRegion;
PageFragment :=
AddressableSubpartOfPage;
Fragment MAY_BE IdentifiedBy {
RegionCoordinates,
TextPosition,
ElementIdentifier,
AnnotationSelector
};
PageContent :=
ContentRenderedOrAssociatedWithPage;
PageContent MAY_INCLUDE {
Text,
Heading,
Paragraph,
Image,
Figure,
Table,
Footnote,
Annotation
};
PageHeader :=
RepeatedOrPageSpecificContentNearTopOfPage;
PageFooter :=
RepeatedOrPageSpecificContentNearBottomOfPage;
RunningHeader MAY_INCLUDE {
ChapterTitle,
SectionTitle,
DocumentTitle
};
LogicalStructure MAY_SPAN MultiplePages;
Chapter MAY_SPAN MultiplePages;
Section MAY_SPAN MultiplePages;
Page MAY_CONTAIN PortionsOfMultipleLogicalComponents;
LogicalPhysicalMapping :=
LogicalComponent
-> OneOrMorePagesOrPageRegions;
PageRange :=
OrderedSetOrIntervalOfPagesAssociatedWithResourceComponent;
PageRange MAY_BE {
Continuous,
Discontinuous
};
PageRange SHOULD_REFERENCE StablePageIdentifiersWherePossible;
Volume :=
PhysicalDivisionContainingPageSequence;
MultiVolumeDocument MAY_HAVE SeparatePageSequencesPerVolume;
PageNumbering MAY_RESTARTAcrossVolumesOrSections;
PageSequenceIdentity SHOULD_NOT DependOnlyOnPrintedNumber;
PageType :=
ClassificationOfPageFunctionOrRole;
PageType MAY_INCLUDE {
Cover,
TitlePage,
ContentsPage,
Content,
Appendix,
Index,
Blank
};
BlankPage :=
PageIntentionallyOrIncidentallyContainingNoPrimaryContent;
BlankPage MAY_STILL_BE StructurallySignificant;
InsertedPage :=
PageAddedBetweenExistingPages;
InsertedPage MAY_REQUIRE PositionAndSequenceUpdate;
MissingPage :=
ExpectedPageNotPresentInAvailableRepresentation;
MissingPage MAY_REDUCE StructuralCompleteness;
DuplicatePage :=
SamePageRepresentationAppearingMoreThanOnceUnexpectedly;
PageStructureValidation MAY_CHECK {
Identifier,
DuplicatePosition,
SequenceGap,
BrokenPreviousNextLink,
PageRange,
ParentDocument
};
IF DuplicatePageIdentifierWithinUniqueScope
THEN IdentifierValidation := violation;
IF TwoPagesOccupySameExclusiveSequencePosition
THEN SequenceConflict MAY_EXIST;
IF PreviousNextRelationshipsContradictPosition
THEN StructuralConsistency SHOULD_DECREASE;
OrphanPage :=
PageWithoutResolvableParentDocumentOrVolumeWhereOneIsRequired;
PageCompleteness :=
DegreeToWhichExpectedPagesAndRequiredMetadataArePresent;
PageConsistency :=
DegreeToWhichIdentifiersNumbersLabelsPositionsAndLinksAgree;
PageIntegrity :=
PreservationOfValidPageIdentitySequenceContentAndRelationships;
PageQuality MAY_INCLUDE {
Completeness,
Consistency,
Integrity,
IdentifierStability,
NavigationAccuracy
};
PageProvenance MAY_INCLUDE {
Source,
Creator,
ScanProcess,
ExtractionMethod,
Timestamp,
Version
};
ScannedPage :=
DigitalImageRepresentationOfPhysicalPage;
ScannedPage MAY_HAVE {
ImageIdentifier,
Resolution,
OCRText,
ScanOrder
};
OCRText MAY_BE AssociatedWith PageOrPageRegion;
OCRReadingOrder MAY_REQUIRE ReconstructionFromPageLayout;
BornDigitalPage :=
PageGeneratedDirectlyFromDigitalDocumentRepresentation;
RenderedPage :=
PageProducedFromUnderlyingDocumentModelForDisplayOrPrint;
PageImage MAY_BE DerivativeRepresentationOfPage;
Page MAY_HAVE MultipleRepresentations {
Image,
Text,
PDFPage,
Thumbnail
};
Representations SHOULD_LINK_TO SameCanonicalPageIdentityWhereAppropriate;
AutomaticPageDetection :=
DocumentOrFile
-> DetectPageBoundaries
-> AssignSequence
-> GeneratePageMetadata;
AI MAY_SUPPORT {
PageSegmentation,
RegionDetection,
ReadingOrderInference,
PageTypeClassification
};
InferredPageMetadata SHOULD_HAVE ConfidenceWhereUncertain;
PageConfidence :=
EstimatedSupportForInferredPageIdentityPositionOrType;
PageVersion :=
PageStateAssociatedWithSpecificDocumentVersion;
DocumentRevision MAY {
AddPage,
RemovePage,
ReorderPage,
RenumberPage,
ReplacePage
};
RenumberPage :=
ChangeHumanReadablePageNumberWithoutNecessarilyChangingPageIdentity;
ReorderPage :=
ChangePagePositionWithinSequence;
ReplacePage :=
SubstitutePageRepresentationOrContent;
StablePageIdentifier MAY_BE PreservedAcrossRenumberingWhenPageIdentityContinues;
PageVersionMapping :=
OldPageIdentifier
-> NewPageIdentifierOrIdentifiers;
PaginationChange MAY_REQUIRE RevalidationOf {
PageRanges,
Citations,
Annotations,
Selectors
};
Annotation MAY_TARGET PageOrPageRegion;
StablePageIdentifierAndSpatialSelector MAY_IMPROVE AnnotationPersistence;
Citation MAY_REFERENCE SpecificPage;
CitationPageNumber SHOULD_BE InterpretedWithinCorrectDocumentEditionOrVersion;
DescriptiveMetadata MAY_DESCRIBE PageWherePageLevelDiscoveryIsNeeded;
StructuralMetadata DEFINES PageSequenceContainmentAndMapping;
TechnicalMetadata MAY_DESCRIBE PageImageResolutionDimensionsOrFileFormat;
PreservationMetadata MAY_USE PageSequenceForLongTermDocumentReconstruction;
PageIndex :=
SearchStructureMappingPageMetadataAndContentToParentDocument;
PageIndex MAY_INCLUDE {
PageIdentifier,
PageNumber,
PageLabel,
ParentDocumentIdentifier,
OCRText,
FullText
};
PageSearch :=
Query
-> MatchPageMetadataOrContent
-> ReturnPageWithParentContext;
SemanticSearch MAY_USE PageFor {
PageScopedRetrieval,
ParentContext,
NeighbourRetrieval,
CitationResolution
};
IF SearchMatchOccursOnPage
THEN Result SHOULD_PRESERVE ParentDocumentAndLogicalSectionContextWhereAvailable;
RAG MAY_USE PageAs {
RetrievalUnit,
CitationUnit,
PhysicalContextBoundary
};
PageBasedChunking MAY_SPLIT OrCombinePages
BUT SHOULD_PRESERVE OriginalPageIdentifiersForCitation;
NeighbourRetrieval MAY_USE PreviousPageAndNextPageRelationships;
KnowledgeGraph MAY_REPRESENT PageAsNode;
GraphRelationships MAY_INCLUDE {
IS_PART_OF,
PRECEDES,
FOLLOWS,
REPRESENTS,
CONTAINS
};
MetadataRepository MAY_STORE PageStructuralMetadata;
MetadataRegistry MAY_REGISTER PagePropertiesAndRelationshipTypes;
RDF MAY_REPRESENT:
Page
-> isPartOf
-> Document;
JSONLD MAY_SERIALISE PageAndStructuralRelationships;
Accessibility MAY_REQUIRE CorrectReadingOrderWithinAndAcrossPages;
VisualPageOrder SHOULD_NOT Override LogicalReadingOrderWhenAccessibilitySemanticsDefineOtherwise;
PageAccessControl MAY_DIFFERFrom ParentDocumentInSpecialisedSystems;
RestrictedPage MUST_NOT_BE ExposedToUnauthorisedConsumer;
PageSecurity MAY_INCLUDE {
IdentifierValidation,
AccessControl,
SequenceIntegrity,
ProvenanceIntegrity,
ChangeAuthorisation
};
MachineReadablePage SHOULD_PRESERVE {
PageIdentifier,
ParentDocumentIdentifier,
PageNumber,
PageLabel,
Position,
PreviousNextLinks,
Version,
Provenance
};
# ---------- SEMANTIC REASONING ----------
IF ResourceComponentRepresentsPhysicalRenderedOrLogicalPageUnit
THEN PageClassification := supported;
IF Document HAS_PART Page
THEN Page IS_PART_OF Document;
IF PageA PRECEDES PageB
THEN PageB FOLLOWS PageA;
IF PageIdentifierStableAcrossRenumbering
THEN ExistingMachineLinks MAY_REMAIN Valid;
IF PagePositionChanges
THEN PreviousNextRelationships SHOULD_BE Recomputed;
IF PaginationChanges
THEN PageBasedCitationsAnnotationsAndRanges SHOULD_BE Revalidated;
IF MissingExpectedPageDetected
THEN PageCompleteness SHOULD_DECREASE;
IF PrintedPageNumberConflictsWithSequencePosition
THEN BothValues SHOULD_BE PreservedWithDistinctSemantics;
# ---------- SEMANTIC EQUIVALENCE ----------
SEMANTIC_EQUIVALENCE {
"page" ~= "document page" WHEN structural_context;
"page identifier" ~= "page ID";
"page number" ~= "printed page number" WHEN pagination_context;
"page label" ~= "display page label";
"page sequence" ~= "physical page order" WHEN linear_document_context;
"page region" ~= "spatial page fragment";
"page range" ~= "document page interval";
"parent document" ~= "containing document";
}
# ---------- QUERY FLOW ----------
QUERY(q) ->
NORMALISE(q) ->
IDENTIFY_PARENT_DOCUMENT(q) ->
IDENTIFY_PAGE(q) ->
RESOLVE_PAGE_IDENTIFIER(q) ->
IDENTIFY_PAGE_NUMBER_LABEL_AND_POSITION(q) ->
IDENTIFY_PREVIOUS_NEXT_RELATIONSHIPS(q) ->
IDENTIFY_PAGE_REGIONS_AND_CONTENT(q) ->
IDENTIFY_LOGICAL_COMPONENT_MAPPING(q) ->
IDENTIFY_VERSION_AND_PROVENANCE(q) ->
VALIDATE_PAGE_STRUCTURE(q) ->
SCORE_CONFIDENCE(q) ->
RETURN_RELEVANT_PAGE_KNOWLEDGE;
# ---------- CONFIDENCE ----------
CONFIDENCE(assertion) :=
weighted_mean(
source_reliability,
page_structure_consistency,
identifier_strength,
sequence_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: Page;
ontology: PageOntology;
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_page:
identify_parent_document
-> assign_page_identifier
-> determine_number_label_and_position
-> identify_page_type
-> link_previous_next
-> attach_provenance
-> validate
-> integrate;
page_revision:
preserve_previous_version
-> apply_content_number_or_representation_changes
-> preserve_identifier_where_identity_continues
-> recompute_sequence_relationships
-> revalidate
-> update_index
-> recompute_confidence
-> regenerate_flow_hash;
pagination_revision:
identify_affected_pages
-> update_positions_numbers_and_links
-> revalidate_ranges_citations_and_annotations
-> map_changed_identifiers
-> integrate;
conflict:
preserve_provenance
-> compare_page_identity_sequence_or_numbering_sources
-> adjust_confidence
-> flag_review;
}
# ---------- FLOW HASH ----------
FLOW_HASH_INPUT :=
DOMAIN
+ SUBDOMAIN
+ ONTOLOGY
+ PageEntity
+ StructuralEntity
+ MetadataEntity
+ Page
+ PageSequence
+ PageStructureValidation
+ RELATIONSHIPS
+ SEMANTIC_REASONING
+ SEMANTIC_EQUIVALENCE
+ UPDATE_MODEL;
FLOW_HASH :=
HASH(FLOW_HASH_INPUT);
# ---------- TERMINAL ----------
PageOntology
-> IdentifyParentDocumentAndVersion
-> DetectOrRegisterPageIdentity
-> AssignStablePageIdentifier
-> CapturePageNumberLabelTypeAndPosition
-> EstablishPreviousAndNextPageRelationships
-> IdentifyPageContentRegionsAndRepresentations
-> MapLogicalComponentsToPhysicalPages
-> ValidateSequenceIdentityAndPagination
-> StoreAndVersionPageMetadata
-> IndexForNavigationSearchAndCitation
-> PreservePageContextForRAGAndSemanticRetrieval
-> MaintainCrossVersionPaginationMappings
-> MaintainReliablePageStructureKnowledge;
END FLOW
Download Code
Copy to Clipboard