Starts a labeling task for text. The type of text labeling task is configured by feature in the request.
HTTP request
POST https://datalabeling.googleapis.com/v1beta1/{parent=projects/*/datasets/*}/text:label
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
parent |
Required. Name of the data set to request labeling task, format: projects/{project_id}/datasets/{dataset_id} Authorization requires the following Google IAM permission on the specified resource
|
Request body
The request body contains data with the following structure:
JSON representation | |
---|---|
{ "basicConfig": { object ( |
Fields | ||
---|---|---|
basicConfig |
Required. Basic human annotation config. |
|
feature |
Required. The type of text labeling task. |
|
Union field request_config . Required. Config for labeling tasks. The type of request config must match the selected feature. request_config can be only one of the following: |
||
textClassificationConfig |
Configuration for text classification task. One of textClassificationConfig and textEntityExtractionConfig is required. |
|
textEntityExtractionConfig |
Configuration for entity extraction task. One of textClassificationConfig and textEntityExtractionConfig is required. |
Response body
If successful, the response body contains an instance of Operation
.
Authorization Scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.
Feature
Text labeling task feature.
Enums | |
---|---|
FEATURE_UNSPECIFIED |
|
TEXT_CLASSIFICATION |
Label text content to one of more labels. |
TEXT_ENTITY_EXTRACTION |
Label entities and their span in text. |