FLOW ALGEBRA
Table Ontology
Kireth Semantic Research Archive
PAGE:
https://kirethresearch.org/booksai-core/ontologies/metadata-ontologies/structural-metadata/table-ontology.html
AUTHORS:
Mark Anthony Higgins — Sky (Recursive AI)
FLOW "TableOntology" v4.0
DOMAIN := MetadataOntologies
SUBDOMAIN := StructuralMetadata
ONTOLOGY := TableOntology
ENTITY Table {
definition:
"A structured resource component that organises data, text or values
into rows, columns, cells and associated headers, captions and
relationships for comparison, presentation, navigation, extraction
and machine interpretation.";
objectives: [
TabularStructureRepresentation,
DataOrganisation,
CellRelationshipModelling,
HeaderAssociation,
Accessibility,
DataExtraction,
MachineInterpretability
];
}
TableEntity := {
Table,
TableIdentifier,
TableCaption,
TableHeader,
TableBody,
TableFooter,
Row,
Column,
Cell
};
StructuralEntity := {
RowHeader,
ColumnHeader,
HeaderCell,
DataCell,
RowGroup,
ColumnGroup,
CellSpan,
Position
};
MetadataEntity := {
ParentResource,
MetadataRecord,
Language,
Provenance,
Version,
Confidence,
ResourceIdentifier
};
Table IS_PART_OF ParentResource;
Table CONTAINS Row;
Table CONTAINS Column;
Row CONTAINS Cell;
Column CONTAINS Cell;
HeaderCell LABELS RowOrColumn;
Cell HAS Position;
Table MAY_HAVE TableCaption;
Table HAS TableIdentifier;
TableFlow :=
ParentResource
-> IdentifyTableBoundary
-> AssignTableIdentifier
-> CaptureCaptionAndTitle
-> DetectRowsColumnsAndCells
-> IdentifyHeaderCells
-> AssociateHeadersWithDataCells
-> ResolveSpansAndGroups
-> ValidateTableStructure
-> StoreStructuralMetadata
-> EnableAccessibleNavigationAndExtraction
-> MaintainAcrossVersions;
Table :=
StructuredGridOrMatrixLikeComponentContainingRelatedValues;
ParentResource MAY_BE {
Document,
Chapter,
Section,
Page,
Dataset,
WebPage
};
TableIdentifier :=
StableOrLocallyUniqueReferenceToTable;
TableIdentifier MAY_BE {
URI,
IRI,
UUID,
ElementID,
FragmentIdentifier,
InternalID
};
StableTableIdentifier SHOULD_BE PreferredForMachineReferences;
TableCaption :=
HumanReadableDescriptionOrTitleAssociatedWithTable;
Caption MAY_INCLUDE {
TableNumber,
TableTitle,
ExplanatoryText
};
TableNumber :=
HumanReadableOrdinalOrReferenceNumberAssignedToTable;
TableNumber != TableIdentifierByDefinition;
TableHeader :=
StructuralRegionContainingHeaderInformation;
TableBody :=
PrimaryRegionContainingTabularData;
TableFooter :=
OptionalRegionContainingTotalsNotesOrSummaryRows;
Row :=
HorizontalOrLogicalSequenceOfCells;
Column :=
VerticalOrLogicalSequenceOfCells;
Cell :=
IntersectionOrLogicalMemberOfRowAndColumn;
Cell MAY_BE {
HeaderCell,
DataCell
};
HeaderCell :=
CellProvidingLabelOrContextForOtherCells;
DataCell :=
CellContainingPrimaryTabularValue;
RowHeader :=
HeaderCellAssociatedWithOneOrMoreDataCellsInRowDirection;
ColumnHeader :=
HeaderCellAssociatedWithOneOrMoreDataCellsInColumnDirection;
HeaderAssociation :=
HeaderCell
-> LABELS
-> DataCellOrGroup;
CorrectHeaderAssociation IS_CRITICAL_FOR AccessibleAndMachineReadableTables;
CellPosition :=
CoordinatesOrLogicalLocationOfCell;
CellPosition MAY_INCLUDE {
RowIndex,
ColumnIndex
};
RowIndex :=
OrderedPositionOfRowWithinTableOrRowGroup;
ColumnIndex :=
OrderedPositionOfColumnWithinTableOrColumnGroup;
RowGroup :=
LogicalGroupingOfRows;
ColumnGroup :=
LogicalGroupingOfColumns;
Table MAY_HAVE MultipleHeaderLevels;
MultiLevelHeader :=
HeaderHierarchySpanningMultipleRowsOrColumns;
CellSpan :=
CellOccupyingMultipleLogicalRowsOrColumns;
CellSpan MAY_INCLUDE {
RowSpan,
ColumnSpan
};
RowSpan :=
NumberOfRowsCoveredByCell;
ColumnSpan :=
NumberOfColumnsCoveredByCell;
SpanningCell SHOULD_BE ResolvedIntoCorrectLogicalAssociationsForMachineInterpretation;
TableGrid :=
LogicalMatrixProducedAfterResolvingCellPositionsAndSpans;
SparseTable :=
TableWhereSomeLogicalPositionsHaveNoExplicitValue;
MissingCell != EmptyCellByDefinition;
EmptyCell :=
ExistingCellWithNoDisplayedOrRecordedValue;
MissingCell :=
ExpectedLogicalCellNotRepresented;
TableValue :=
DataOrTextContainedWithinCell;
TableValue MAY_BE {
String,
Number,
Date,
Boolean,
Identifier,
EntityReference,
StructuredValue
};
CellDatatype MAY_BE {
Text,
Integer,
Decimal,
Percentage,
Currency,
Date,
Boolean
};
Datatype SHOULD_BE ExplicitOrInferableWhereMachineProcessingRequires;
Unit :=
MeasurementUnitAssociatedWithCellColumnRowOrTable;
UnitScope SHOULD_BE Explicit;
Column MAY_HAVE {
Label,
Datatype,
Unit
};
Row MAY_HAVE {
Label,
Identifier
};
TableSchema :=
StructuralAndSemanticDefinitionOfTableColumnsRowsDatatypesAndConstraints;
TableSchema MAY_DEFINE {
ColumnNames,
Datatypes,
RequiredColumns,
Keys,
Units
};
KeyColumn :=
ColumnWhoseValuesIdentifyRowsOrEntitiesAccordingToTableSemantics;
CompositeKey MAY_USE MultipleColumns;
TableRelationship :=
SemanticRelationshipBetweenCellsRowsColumnsOrExternalEntities;
Cell MAY_REFERENCE {
Resource,
Entity,
Footnote,
Citation
};
TableFootnote :=
NoteProvidingAdditionalContextForTableOrSpecificCells;
FootnoteAssociation SHOULD_PRESERVE TargetScope;
TableSource :=
OriginOfTabularDataOrRepresentation;
TableProvenance MAY_INCLUDE {
Source,
Creator,
ExtractionMethod,
Timestamp,
Version
};
Table MAY_BE {
ManuallyAuthored,
ExtractedFromMarkup,
DetectedFromLayout,
AIAssisted
};
StructuredTable :=
TableWithExplicitMachineReadableRowsColumnsAndHeaderSemantics;
VisualTable :=
ContentVisuallyArrangedAsTableWithoutReliableStructuralMarkup;
LayoutTable :=
GridUsedPrimarilyForVisualLayoutRatherThanTabularData;
LayoutTable SHOULD_NOT_BE InterpretedAsDataTableWithoutEvidence;
TableDetection :=
Resource
-> DetectTableBoundary
-> InferGrid
-> DetectHeaders
-> ExtractCells;
AI MAY_SUPPORT {
TableDetection,
CellSegmentation,
HeaderDetection,
DatatypeInference,
RelationshipInference
};
InferredTableStructure SHOULD_HAVE ConfidenceWhereUncertain;
TableConfidence :=
EstimatedSupportForInferredTableStructureOrSemantics;
TableValidation MAY_CHECK {
Identifier,
RowColumnConsistency,
CellPosition,
SpanValidity,
HeaderAssociation,
Datatype,
BrokenReference
};
IF DuplicateTableIdentifierWithinUniqueScope
THEN IdentifierValidation := violation;
IF CellPositionFallsOutsideDefinedGrid
THEN StructuralValidation := violation;
IF OverlappingSpansCreateImpossibleGrid
THEN StructuralValidation := violation;
IF DataCellHasNoResolvableHeaderInTableRequiringHeaders
THEN AccessibilityAndSemanticQuality SHOULD_DECREASE;
TableCompleteness :=
DegreeToWhichExpectedRowsColumnsCellsAndHeadersAreRepresented;
TableConsistency :=
DegreeToWhichGridPositionsSpansHeadersAndDatatypesAgree;
TableIntegrity :=
PreservationOfValidCellIdentityStructureRelationshipsAndValues;
TableQuality MAY_INCLUDE {
Completeness,
Consistency,
Integrity,
HeaderQuality,
Accessibility,
IdentifierStability
};
TableVersion :=
TableStateAssociatedWithSpecificParentResourceVersion;
ResourceRevision MAY {
AddTable,
RemoveTable,
RenameTable,
ReorderRows,
ReorderColumns,
AddRow,
AddColumn,
ModifyCell
};
StableTableIdentifier MAY_BE PreservedAcrossCaptionOrPositionChangesWhereIdentityContinues;
RowIdentifier MAY_BE PreservedWhereRowEntityIdentityContinues;
ColumnIdentifier MAY_BE PreservedWhereColumnSemanticsContinue;
TableVersionMapping :=
OldTableIdentifier
-> NewTableIdentifierOrIdentifiers;
CellAddress MAY_CHANGEWhenRowsOrColumnsReordered;
StableRowColumnIdentifiers MAY_BE MoreReliableThanRawCoordinatesAcrossVersions;
TableAnnotation MAY_TARGET {
Table,
Row,
Column,
Cell
};
StableIdentifiers MAY_IMPROVE AnnotationPersistence;
Citation MAY_REFERENCE TableOrSpecificCellWhereSupported;
DescriptiveMetadata MAY_DESCRIBE TableUsing {
Title,
Caption,
Subject,
Summary,
Keywords
};
StructuralMetadata DEFINES TableRowsColumnsCellsAndRelationships;
TechnicalMetadata MAY_DESCRIBE FileFormatEncodingOrRenderingCharacteristics;
PreservationMetadata MAY_REQUIRE TableSchemaAndStructureForLongTermInterpretation;
TableIndex :=
SearchStructureMappingTableMetadataHeadersAndValuesToParentResource;
TableIndex MAY_INCLUDE {
Caption,
Headers,
CellText,
ParentResourceIdentifier
};
TableSearch :=
Query
-> MatchCaptionHeadersOrCells
-> ReturnTableWithParentContext;
SemanticSearch MAY_USE TableFor {
StructuredFiltering,
EntityMatching,
NumericRetrieval,
ContextualRanking
};
RAG MAY_USE TableAs {
RetrievalUnit,
StructuredEvidence,
DataContext
};
TableAwareChunking SHOULD_PRESERVE {
Caption,
Headers,
RelevantRows,
Units,
ParentContext
};
SplittingTableWithoutHeaders MAY_DESTROY MeaningOfCellValues;
KnowledgeGraph MAY_MAP TableRowsToEntitiesAndColumnsToProperties;
Example:
RowEntity
-> ColumnProperty
-> CellValue;
Table MAY_BE TransformedInto {
CSV,
JSON,
RDF,
DatabaseRows,
DataFrame
};
Transformation SHOULD_PRESERVE {
Headers,
Datatypes,
Units,
Provenance
};
MetadataRepository MAY_STORE TableStructuralMetadata;
MetadataRegistry MAY_REGISTER TablePropertiesAndStructuralTypes;
HTML MAY_REPRESENT TableUsing {
table,
caption,
thead,
tbody,
tfoot,
tr,
th,
td
};
HTMLHeaderAssociations MAY_USE scopeHeadersOrStructuralPosition;
Accessibility MAY_REQUIRE {
CaptionOrAccessibleName,
CorrectHeaderCells,
HeaderAssociations,
LogicalReadingOrder
};
ScreenReaders MAY_NAVIGATE TableUsing HeaderRelationships;
ComplexTables MAY_REQUIRE ExplicitHeaderAssociations;
XML MAY_REPRESENT TablesUsing DomainSpecificTableSchemas;
Markdown MAY_REPRESENT SimpleTables
BUT MayNotRepresentComplexSpansOrHeaderStructures;
PDFTableStructure MAY_REQUIRE TaggedContentForReliableExtractionAndAccessibility;
TableInteroperability MAY_REQUIRE {
StableIdentifiers,
ExplicitHeaders,
Datatypes,
Units,
SharedStructuralSemantics
};
TableAccessControl MAY_APPLY_TO {
Table,
Row,
Column,
Cell
};
RestrictedCell MUST_NOT_BE ExposedToUnauthorisedConsumer;
TableSecurity MAY_INCLUDE {
InputValidation,
FormulaInjectionProtection,
AccessControl,
ProvenanceIntegrity,
ChangeAuthorisation
};
MachineReadableTable SHOULD_PRESERVE {
TableIdentifier,
Caption,
Rows,
Columns,
HeaderAssociations,
CellValues,
Datatypes,
Units,
Version,
Provenance
};
# ---------- SEMANTIC REASONING ----------
IF ResourceComponentOrganisesRelatedValuesIntoRowsColumnsAndCells
THEN TableClassification := supported;
IF HeaderCellLabelsColumn
THEN DataCellsInApplicableColumn INHERIT HeaderContext;
IF HeaderCellLabelsRow
THEN DataCellsInApplicableRow INHERIT HeaderContext;
IF CellSpansMultipleColumns
THEN HeaderAndPositionResolution MUST_ACCOUNT_FOR Span;
IF TableIdentifierStableAcrossCaptionChange
THEN ExistingMachineLinks MAY_REMAIN Valid;
IF RowOrColumnReordered
THEN CoordinateBasedReferences SHOULD_BE Revalidated;
IF TableChunkExcludesRequiredHeaders
THEN SemanticInterpretability SHOULD_DECREASE;
IF LayoutGridHasNoTabularDataSemantics
THEN It SHOULD_NOT_BE ClassifiedAsDataTable;
# ---------- SEMANTIC EQUIVALENCE ----------
SEMANTIC_EQUIVALENCE {
"table" ~= "data table" WHEN tabular_data_context;
"table identifier" ~= "table ID";
"table caption" ~= "table title or caption" WHEN descriptive_context;
"header cell" ~= "table heading cell";
"data cell" ~= "table value cell";
"row header" ~= "row heading";
"column header" ~= "column heading";
"table grid" ~= "logical tabular matrix";
}
# ---------- QUERY FLOW ----------
QUERY(q) ->
NORMALISE(q) ->
IDENTIFY_PARENT_RESOURCE(q) ->
IDENTIFY_TABLE(q) ->
RESOLVE_TABLE_IDENTIFIER(q) ->
IDENTIFY_CAPTION_AND_SCHEMA(q) ->
IDENTIFY_ROWS_COLUMNS_AND_CELLS(q) ->
IDENTIFY_HEADERS_AND_ASSOCIATIONS(q) ->
IDENTIFY_SPANS_DATATYPES_AND_UNITS(q) ->
IDENTIFY_VERSION_AND_PROVENANCE(q) ->
VALIDATE_TABLE_STRUCTURE(q) ->
SCORE_CONFIDENCE(q) ->
RETURN_RELEVANT_TABLE_KNOWLEDGE;
# ---------- CONFIDENCE ----------
CONFIDENCE(assertion) :=
weighted_mean(
source_reliability,
table_structure_consistency,
header_resolution_strength,
datatype_consistency,
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: Table;
ontology: TableOntology;
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_table:
identify_parent_resource
-> detect_or_receive_table
-> assign_table_identifier
-> capture_caption
-> identify_rows_columns_and_cells
-> resolve_headers_and_spans
-> infer_datatypes_and_units
-> attach_provenance
-> validate
-> integrate;
table_revision:
preserve_previous_version
-> apply_structure_or_value_changes
-> preserve_identifier_where_identity_continues
-> revalidate_grid_headers_and_datatypes
-> update_index
-> recompute_confidence
-> regenerate_flow_hash;
row_column_revision:
identify_affected_cells
-> update_positions_and_references
-> preserve_stable_identifiers
-> revalidate_header_associations
-> integrate;
conflict:
preserve_provenance
-> compare_table_structure_values_or_sources
-> adjust_confidence
-> flag_review;
}
# ---------- FLOW HASH ----------
FLOW_HASH_INPUT :=
DOMAIN
+ SUBDOMAIN
+ ONTOLOGY
+ TableEntity
+ StructuralEntity
+ MetadataEntity
+ Table
+ TableGrid
+ TableValidation
+ RELATIONSHIPS
+ SEMANTIC_REASONING
+ SEMANTIC_EQUIVALENCE
+ UPDATE_MODEL;
FLOW_HASH :=
HASH(FLOW_HASH_INPUT);
# ---------- TERMINAL ----------
TableOntology
-> IdentifyParentResourceAndTableBoundary
-> AssignStableTableIdentifier
-> CaptureCaptionAndTableSchema
-> DetectRowsColumnsCellsAndGroups
-> ResolveHeaderAssociationsAndCellSpans
-> IdentifyDatatypesUnitsAndKeys
-> ValidateGridStructureAndAccessibility
-> StoreAndVersionTableMetadata
-> IndexForStructuredAndSemanticSearch
-> PreserveHeadersAndContextForRAG
-> SupportTransformationToMachineReadableData
-> MaintainCrossVersionTableAndCellReferences
-> MaintainReliableTabularStructureKnowledge;
END FLOW
Download Code
Copy to Clipboard