Parameters
| Param |
Type |
Default |
Description |
| name |
string |
|
Name of the element |
| toName |
string |
|
Name of the HTML element to label |
| [choice] |
single | multiple |
single |
Configure if you can select one or multiple labels |
| [maxUsages] |
number |
|
Maximum number of times a label can be used per task |
| [showInline] |
boolean |
true |
Show labels in the same visual line |
Result parameters
| Name |
Type |
Description |
| value |
Object |
|
| value.start |
string |
xpath of the container where the region starts (xpath) |
| value.end |
string |
xpath of the container where the region ends (xpath) |
| value.startOffset |
number |
offset within start container |
| value.endOffset |
number |
offset within end container |
| [value.text] |
string |
text content of the region, can be skipped |
Example JSON
{
"value": {
"start": "/div[1]/p[2]/text()[1]",
"end": "/div[1]/p[4]/text()[3]",
"startOffset": 2,
"endOffset": 81,
"hypertextlabels": ["Car"]
}
}