What is a Number Field

The Number field data type enables users to extract numeric characters from their documents using the API Builder. This is done by selecting the Number field when creating and defining your data model.

Set Up a Number field

After you've set up your custom API,

  • Go to the define your model page
  • Set up the number field by choosing Number from the right side menu. 
    number model fieldnumber model field
  • Enter the Field Name and API Response Key according to the data you want to extract.
    nnumber field name and API response fillednnumber field name and API response filled

📘

The API Response Key is automatically filled for you but you can change that to something most suitable for you according to your needs.

Additional Parameters

If you have additional context about this specific field or how the information is usually displayed in your documents, you can specify it during the field set up by enabling the checkbox that suits your demand.
number model additional fieldnumber model additional field

  • It is always an integer: by checking this, the API will not read a number that cannot be parsed as an integer. For e.g “fifteen” or “two hundred and twelve” are not parsed as Numbers. If the information you are looking for is sometimes displayed as such, you should use the Text field.
  • Can be handwritten: by checking this, the API will be able to detect handwritten words more accurately. This doesn’t stop the API from detecting non-handwritten words.

Feed parameters through config.json file

You can also fill the parameters in the cfg objects of your config.json file.

  • is_integer : the number or amount is an integer
    • possible values: -1 means sometimes; 1 means always
    • default value: -1

A valid entry for a number field in a config.json should look like this:

{
  "cfg": {
    "is_integer": -1
  },
  "handwritten": false,
  "name": "rating",
  "semantics": "amount",
  "public_name": "rating"
}

Training and Predictions

By specifying the data type as Number, this will enable the API to only consider words and series of words that can be interpreted as numbers or amounts as eligible candidates.

This means that, the API will not extract any information in your document that cannot be interpreted as an amount or a number for this specific field.

 

Questions?

Slack Logo IconSlack Logo Icon  Join our Slack


Did this page help you?