What is Text Field?

The text field data type enables users to extract any information such as full name, addresses, place, numbers etc from their documents using the API Builder. This is done by selecting the Text field when creating and defining your data model.

📘

The text field should be your go-to data type if you do not have sufficient context about your documents or if the information you are looking for is displayed in inconsistent ways in the documents.

Set Up a Text field

After you've set up your custom API,

  • Go to the define your model page.
  • Set up the text field by choosing Text from the right side menu.
    text field type
  • Enter the Field Name and API Response Key according to the data you want to extract.
    text 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 and 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.

Note: This may have limitations for you in the training phase and when making predictions later on.

text field additional parameters

  • It never contains any numeric characters(0-9). by checking this, the API will not detect a word or group of words containing numeric characters (0-9) etc for this field.
  • It never contains any alpha characters(a-Z). by checking this, the API will not detect a word or group of words containing alpha characters (a-Z) for this 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.

  • alpha: true if it only alpha characters (a-Z), otherwise false

  • numeric: true if it only contains numeric characters (0-9), otherwise false

 If the string is made up of both character types, both values are true. It is not possible for both values to be false.

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

{
  "cfg": {
          "numeric": false,
          "alpha": false
        },
  "handwritten": false,
  "name": "name",
  "public_name": "name",
  "semantics": "word"
}

Training and Predictions

By default, the Text field allows every information read on the document to be considered as an eligible candidate. Specifying the different parameters provides the API with a list of criteria that a word or group of words should match in order to be considered as a valid or eligble candidate.

This means that, the API will not extract any information in your document that do not match these criteria for this specific field.

 

Questions?
Slack Logo Icon  Join our Slack