Did you know ... Search Documentation:
Pack odf_sheet -- prolog/ods/table.pl
PublicShow source

This module provides an unstable prototype for recognising tables on sheets. A table consists of one rectangle that describes the content and zero or more adjacent rectangles that provide information about the content (i.e., headers)

 assert_tables(:Sheet, ?Type) is det
Infer and assert identified tables. Creates the following facts:
  • table(TableID, Type, MainDS, HeaderDSList, UnionDS)
  • cell_property(Sheet, X, Y, table(TableID))
 tables(?Sheet, +Type, -Tables) is det
Make an initial guess at all tables. Table is a list of table(Data, Headers,Union).
 data_blocks(:Sheet, +Type, -Blocks) is nondet
True when Blocks is a list of non-verlapping datasources that contains all detected blocks. This implies that we need to
  • resolve intersections. There are several options:
    • create a union from the intersecting blocks
    • Split into independent rectangles
  • Optionally join adjacent
Arguments:
Type- is the cell-type (string, float, ...)
 block_union_new_non_empty(+Blocks, -Union, -NonEmptyBlocks) is det
Determine the union of Blocks and unify NonEmptyDS with a list of additional blocks that were added to Union and are not part of any block in Blocks.
 assert_blocks(:Sheet, ?Type) is det
Infer and assert identified blocks. Creates the following facts:
  • block(BlockID, Type, MainDS, HeaderDSList, UnionDS)
  • cell_property(Sheet, X, Y, block(BlockID))
 table(:DataDS, ?SupportDS) is nondet
True when there is a table with DataDS and a list of support datasources.
 adjacent_objects(:Sheet, +Type, ?Obj1, ?Obj2, ?Rel)
True when Obj1 and Obj2 are adjacent in Sheet. Rel is one of above, below left_of or right_of
 intersecting_objects(:Sheet, +Type, ?Obj1, ?Obj2, -Intersection)
True when Obj1 and Obj2 intersect in Sheet. Intersection is the intersecting part.
 color_sheets(?Sheet, ?What) is det
Assign colours to objects in sheets. Colours are named 1,2,3,4.
 cells_outside_tables(+Sheet, +Tables, -Cells) is det
True when Cells is a list of cell(Sheet,X,Y) that is outside any table.