When creating a textcollection
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.
- Verify the task response field schema for the desired task type.
- Review your project taxonomy (label names, attribute conditions, annotation types, etc).
- Generate pre-labels that are formatted to match the aforementioned schema and taxonomy.
- 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. In this particular task type, annotations
field is mandatory inside the hypothesis object.
The only difference between hypothesis
and the response
format is that inside every field you want to pre-annotate, you'll need to add two more field fields:
type
describes the field type (category, select, text, etc.)
field_id
describes the identification given to this field for tracking (field name)
You can find these two fields in your task taxonomy
Hypothesis Example:
{
...
"batch": "regular_batch_name",
"hypothesis": {
"annotations": {
"(EXAMPLE) Multiple Choice Question": {
"type": "category",
"field_id": "(EXAMPLE) Multiple Choice Question",
"response": [
[
"B"
]
]
}
}
},
...
}
{
"fields": [
{
"type": "category",
"field_id": "(EXAMPLE) Multiple Choice Question",
"title": "Which option best fits this task?",
"choices": [
{
"label": "A",
"value": "A"
},
{
"label": "B",
"value": "B"
},
{
"label": "C",
"value": "C"
}
],
"min_choices": 1,
"max_choices": 1,
"description": "Select one of the following. "
}
]
}
"response": {
"annotations": {
"(EXAMPLE) Multiple Choice Question": [
"B"
]
}
}
Note: For Text types fields the response format differs from the other types. For this particular field type, response
field will be an array of a single string instead of an array of arrays containing strings.
{
...
"hypothesis": {
"annotations": {
"Product Description": {
"type": "text",
"field_id": "(EXAMPLE) Text Input Field",
"response": [
"Dolore in dolor occaecat deserunt ex in qui non amet est."
]
}
}
}
...
}