Sensible

The Sensible Developer Hub

Welcome to the Sensible developer hub. You'll find comprehensive guides and documentation to help you start working with Sensible as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Matches tables based on bag-of-words scoring and returns their collated column contents. Use the Table method when dealing with tables in the same document type that have a variable number of columns. Choose anchor text that precedes the table, for example, a table title.

Parameters

Note: For the full list of parameters available for this method, see Global parameters for methods. The following table only shows parameters most relevant to or specific to this method.

keyvaluedescription
id (required)tableWhen you specify the Table method in a Field query object, you must also specify "type": "table" in the field's parameters.
columns (required)arrayAn array of objects with the following parameters:
-id (required): The id for the column in the extraction output.
-terms (required): An array of strings with terms to score positively. Sensible uses NLP techniques (such as tokenization and stemming) to score matches for the strings. Usually, you include column headings in this array.
-stopTerms: An array of strings with terms to score negatively. Sensible uses NLP techniques (such as tokenization and stemming) to score matches for the strings.
-type: The type of the value in the table cell. For more information about types, see Field query object.
-isRequired (default false): If true, Sensible does not return rows in which a value is not present in this column. If false, Sensible returns nulls for rows in which a value is not present. Bear in mind that if you set this parameter to true for an empty row in one column, Sensible leaves out that row for all other columns as well, even if that row had content under a different column.
stopMatch object(Recommended) Match object to stop table recognition. This method uses OCR to recognize a table. With a Stop parameter defined, Sensible OCRs only the pages from the starting anchor to the page with the stop match. Otherwise, Sensible OCRs all pages, which can impact performance.

Examples

The following example shows extracting two columns from a table that updates monthly with a variable number of columns in the Sensible app. Notes:

  • In order to filter out all column headings, the config specifies "type": "number" and "isRequired": true for the column rank_this_month .
  • To improve performance, the config specifies a Stop parameter. This ensures Sensible only OCRs the relevant page area while looking for a table.

You can try out this example yourself in the Sensible app using the following downloadable PDF and config:

Example PDF for tableDownload link

This example uses the following config:

{
  "fields": [
    {
      "id": "agile_risks_table_updates_monthly",
      "anchor": "agile software",
      "type": "table",
      "method": {
        "id": "table",
        "columns": [
          {
            "id": "col1_risk_description",
            "terms": [
              "risk",
              "description"
            ],
          },
          {
            "id": "rank_this_month",
            "terms": [
              "this month"
            ],
            "type": "number",
            "isRequired": true
          }
        ],
        "stop": {
          "type": "startsWith",
          "text": "project managers"
        }
      }
    }
  ]
}

Updated 10 days ago


Table


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.