table

Purpose

Finds documents that contain arguments within tables or table sections that match specified criteria.

Syntax

table([term_1, [term_2, …​]])

Arguments

The function requires at least one term as an argument.

The function also supports optional named parameters that allow to specify additional search criteria. Below is an exhaustive list of these parameters:

  • name: to search only within tables with a specified name, may be specified by PDL-query;

  • number: to search only within tables with a specified number;

  • col/column: to search only within columns with a specified name/number; may be specified by PDL-query;

  • row: to search only within rows with a specified name/number; may be specified by PDL-query;

  • axis: to search within rows or columns with a specified name; may be specified by PDL-query;

  • cell: to search only within specified cells; may be specified by PDL-query;

  • cell_units: to search units within specified cells;

  • match: to specify table sections that should be highlighted; (cell/row/column/table/name/row_name/col_name);

  • whole:=yes: to find a text only if it matches the whole cell value or column, row or table name (set to "no" by default);

  • level to specify a nested table level (starting from 1) using relational operators ">", "<", ">=", "<=", "!=";

  • nested:=yes/no to search within or outside of nested tables (default value is "no");

  • has_nested:=yes to search only tables containing nested tables (default value is "yes").

Note
  1. One can use the relational operators ">", "<", ">=", "<=", "!=" to specify a search within numerical parameters, e.g. table(col:>1, col:<3, row:>4)

  2. A named group can not be an optional named parameter value.

Returned Value

Documents matching the query.

Examples

table() matches all tables of the document.

table(density, velocity) matches all occurrences of the words density and velocity within tables.

table(density, velocity, match:=cell) matches table cells containing words density and velocity.

table(density, velocity, match:=row) matches table rows containing words density and velocity.

table(name:=phrase(glucose, tolerance or level)) matches tables with the name matched by the query, such as "Oral glucose tolerance test", "Normal and Diabetic Plasma Glucose Levels in mg/dL", etc.

table(col:="atomic number", row:=lithium or carbon) matches table cells at the intersection of column and row with name matched by the query.

table(number:=3) matches the table №3.

table(number:=4, column:=2) matches the column №2 of the table №4.

table(col:=orn(underweight, weight, overweight)) matches columns with the name matched by the query, such as "Healthy weight", "Overweight 25 to 29.9", "Underweight Below 18.5", "Low birth weight", etc.

table(number:=4, row:=23, column:=2) matches cell at the intersection of the column №2 and the row №23 of the table №4.

table(number(), axis:=italy, axis:=2010) matches numbers at the intersection of columns with header containing "italy" and rows with name containing "2010" or vice versa.

table("customer", has_nested:=yes) matches the word "customer" if it occurs in a table containing nested tables.

table(row:>=5, level:=2, "glucose intolerance") matches all rows starting with 5 and containing "glucose intolerance" within a second-level nested table.

table(cell:="glucose intolerance", nested:=yes) matches all cells containing "glucose intolerance" within a nested table.