Document Transcription Hypothesis

When creating a Document Transcription task, you can provide prelabels in the hypothesis field, so that workers don't have to start from scratch to annotate the image.

In order to add pre-labels in a task using hypothesis, you’ll need to provide these in the hypothesis field of the payload when creating the task. The schema of the hypothesis object must match the schema of the task response.

  1. Verify the task response field schema for the desired task type.
  2. Review your project taxonomy (label names, attribute conditions, annotation types, etc).
  3. Generate pre-labels that are formatted to match the aforementioned schema and taxonomy.
  4. Create a task, including a hypothesis field that contains the pre-labels at the same top-level as other task fields such as project and instructions.

The hypothesis format will largely mirror Scale’s task response format.

{
…
"hypothesis": {
       "annotations": [
           {
               "uuid": "f5114a62-7f07-4aa3-8ba6-8a2870a28777",
               "page": 0,
               "label": "(EXAMPLE) line_item_quantity",
               "text": "1.00",
               "location": {
                   "type": "box",
                   "top": 825,
                   "left": 1072,
                   "width": 40,
                   "height": 20.999999999999986
               },
               "refs": []
           },
           {
               "uuid": "74bf3036-c66e-4a39-82b3-bef50452875c",
               "page": 0,
               "label": "(EXAMPLE) line_item_unit_pric",
               "text": "914.29",
               "location": {
                   "type": "box",
                   "top": 821.9869095041355,
                   "left": 1391.9781744868894,
                   "width": 77.0218255131106,
                   "height": 26.025606636120784
               },
               "refs": [],
               "money": {
                   "amount": "914.29",
                   "parsed": true
               }
           }
       ],
       "values": [
           {
               "field_id": "has_due_date",
               "selected": [
                   "yes"
               ]
           }
       ],
       "records": [],
       "inlineComments": []
   },
…
}
{
   "annotations": [
       {
           "uuid": "f5114a62-7f07-4aa3-8ba6-8a2970a28777",
           "page": 0,
           "label": "(EXAMPLE) line_item_quantity",
           "text": "1.00",
           "location": {
               "type": "box",
               "top": 825,
               "left": 1072,
               "width": 40,
               "height": 20.999999999999986
           },
           "refs": []
       },
       {
           "uuid": "74bf3036-c66e-4a39-82b3-bef50452875c",
           "page": 0,
           "label": "(EXAMPLE) line_item_unit_pric",
           "text": "914.29",
           "location": {
               "type": "box",
               "top": 821.9869095041355,
               "left": 1391.9781744868894,
               "width": 77.0218255131106,
               "height": 26.025606636120784
           },
           "refs": [],
           "money": {
               "amount": "914.29",
               "parsed": true
           }
       }
   ],
   "values": [
       {
           "field_id": "has_due_date",
           "selected": [
               "yes"
           ]
       }
   ],
   "records": [],
   "inlineComments": []
}
{
   "features": [
       {
           "label": "(EXAMPLE) line_item_quantity",
           "type": "text",
           "flags": []
       },
       {
           "label": "(EXAMPLE) line_item_unit_pric",
           "type": "text",
           "flags": [
               "money"
           ]
       }
   ],
   "fields": [
       {
           "field_id": "has_due_date",
           "title": "(EXAMPLE) Is there a due date on the invoice?",
           "type": "select",
           "options": [
               {
                   "title": "Yes",
                   "value": "yes"
               },
               {
                   "title": "No",
                   "value": "no"
               }
           ]
       }
   ],
   "geometry": "box",
   "attachment_type": "image",
   "attachments": [
       "scaledata://634730d90e2643113235324f1c/b94c5e0b-4cc3-4841-9171-f1950a295df0"
   ]
}