

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 使用 Ground Truth 进行文本标注
<a name="sms-label-text"></a>

使用 Ground Truth 标注文本。Ground Truth 支持用于命名实体识别、单一标签文本分类和多标签文本分类的标注文本。以下主题将介绍了这些内置任务类型的信息，以及帮助您使用此任务类型创建标注作业的说明。

**提示**  
要进一步了解支持的文件类型和输入数据限额，请参阅[输入数据](sms-data-input.md)。

**Topics**
+ [

# 使用命名实体识别提取文本信息
](sms-named-entity-recg.md)
+ [

# 通过文本分类（单标签）对文本进行分类
](sms-text-classification.md)
+ [

# 通过文本分类（多标签）对文本进行分类
](sms-text-classification-multilabel.md)

# 使用命名实体识别提取文本信息
<a name="sms-named-entity-recg"></a>

要从非结构化文本中提取信息并将其归类为预定义类别，请使用 Amazon G SageMaker round Truth 命名实体识别 (NER) 标签任务。传统上，NER 涉及筛选文本数据来定位名词短语（称为*命名实体*），并使用标签对每个短语进行分类，例如，“人”、“组织”或“品牌”。您可以扩展此任务以标注更长的文本跨度，并使用您指定的预定义标签对这些序列进行分类。您可以使用 Amazon A SageMaker I 控制台的 Ground Truth 部分或[https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateLabelingJob.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateLabelingJob.html)操作创建命名实体识别标签作业。

当负责命名实体识别标注作业时，工作人员会将标签应用于较大文本块中的特定单词或短语。他们选择一个标签，然后通过使用光标突出显示标签所应用的文本部分来应用该标签。Ground Truth 命名实体识别工具支持重叠注释、上下文中的标签选择和单个突出显示的多标签选择。此外，工作人员可以使用键盘快速选择标签。

**重要**  
如果您手动创建输入清单文件，请使用 `"source"` 来识别要标注的文本。有关更多信息，请参阅 [输入数据](sms-data-input.md)。

## 创建命名实体识别标注作业（控制台）
<a name="sms-creating-ner-console"></a>

您可以按照说明学习[创建标注作业（控制台）](sms-create-labeling-job-console.md)如何在 SageMaker AI 控制台中创建命名实体识别标签作业。在步骤 10 中，从**任务类别**下拉菜单中选择**文本**，然后选择**命名实体识别**作为任务类型。

Ground Truth 为标注任务提供类似于以下内容的工作人员 UI。使用控制台创建标注作业时，需要指定说明，以便于工作人员完成工作人员可以从中选择的作业和标签。

![\[Gif 显示了如何在 A SageMaker I 控制台中创建命名实体识别标签作业。\]](http://docs.aws.amazon.com/zh_cn/sagemaker/latest/dg/images/sms/gifs/nertool.gif)


## 创建命名实体识别标注作业 (API)
<a name="sms-creating-ner-api"></a>

要创建命名实体识别标签作业，请使用 SageMaker API 操作`CreateLabelingJob`。此 API 为所有人定义了此操作 AWS SDKs。要查看此操作 SDKs 支持的特定语言列表，请查看的 “**另请参阅**” 部分。[https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateLabelingJob.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateLabelingJob.html)

请按照[创建标注作业 (API)](sms-create-labeling-job-api.md)中的说明进行操作，并在配置请求时执行以下操作：
+ 此任务类型的注释前 Lambda 函数以 `PRE-NamedEntityRecognition` 结尾。要查找您所在地区的预注释 Lambda ARN，请参阅。[PreHumanTaskLambdaArn](https://docs.aws.amazon.com/sagemaker/latest/dg/API_HumanTaskConfig.html#SageMaker-Type-HumanTaskConfig-PreHumanTaskLambdaArn)
+ 此任务类型的注释合并 Lambda 函数以 `ACS-NamedEntityRecognition` 结尾。要查找您所在地区的注释合并 Lambda ARN，请参阅。[AnnotationConsolidationLambdaArn](https://docs.aws.amazon.com/sagemaker/latest/dg/API_AnnotationConsolidationConfig.html#SageMaker-Type-AnnotationConsolidationConfig-AnnotationConsolidationLambdaArn)
+ 您必须为 `[HumanTaskUiArn](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UiConfig.html#sagemaker-Type-UiConfig-HumanTaskUiArn)` 提供以下 ARN：

  ```
  arn:aws:sagemaker:aws-region:394669845002:human-task-ui/NamedEntityRecognition
  ```

  将 `aws-region` 替换为您用来创建标注作业的 AWS 区域。例如，如果您在美国西部（北加利福尼亚）创建标注作业，请使用 `us-west-1`。
+ 使用 `instructions` 参数在标签类别配置文件中提供工作人员说明。您可以在 `shortInstruction` 和 `fullInstruction` 字段中使用字符串或 HTML 标记语言。有关更多详细信息，请参阅[在标签类别配置文件中提供工作人员说明](#worker-instructions-ner)。

  ```
  "instructions": {"shortInstruction":"<h1>Add header</h1><p>Add Instructions</p>", "fullInstruction":"<p>Add additional instructions.</p>"}
  ```

以下是一个 [AWS Python SDK (Boto3) 请求](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/sagemaker.html#SageMaker.Client.create_labeling_job)示例，该请求在美国东部（弗吉尼亚州北部）区域中创建标注作业。所有红色参数都应替换为您的规范和资源。

```
response = client.create_labeling_job(
    LabelingJobName='example-ner-labeling-job',
    LabelAttributeName='label',
    InputConfig={
        'DataSource': {
            'S3DataSource': {
                'ManifestS3Uri': 's3://bucket/path/manifest-with-input-data.json'
            }
        },
        'DataAttributes': {
            'ContentClassifiers': [
                'FreeOfPersonallyIdentifiableInformation'|'FreeOfAdultContent',
            ]
        }
    },
    OutputConfig={
        'S3OutputPath': 's3://bucket/path/file-to-store-output-data',
        'KmsKeyId': 'string'
    },
    RoleArn='arn:aws:iam::*:role/*',
    LabelCategoryConfigS3Uri='s3://bucket/path/label-categories.json',
    StoppingConditions={
        'MaxHumanLabeledObjectCount': 123,
        'MaxPercentageOfInputDatasetLabeled': 123
    },
    HumanTaskConfig={
        'WorkteamArn': 'arn:aws:sagemaker:region:*:workteam/private-crowd/*',
        'UiConfig': {
            'HumanTaskUiArn': 'arn:aws:sagemaker:us-east-1:394669845002:human-task-ui/NamedEntityRecognition'
        },
        'PreHumanTaskLambdaArn': 'arn:aws:lambda:us-east-1:432418664414:function:PRE-NamedEntityRecognition',
        'TaskKeywords': [
            'Named entity Recognition',
        ],
        'TaskTitle': 'Named entity Recognition task',
        'TaskDescription': 'Apply the labels provided to specific words or phrases within the larger text block.',
        'NumberOfHumanWorkersPerDataObject': 1,
        'TaskTimeLimitInSeconds': 28800,
        'TaskAvailabilityLifetimeInSeconds': 864000,
        'MaxConcurrentTaskCount': 1000,
        'AnnotationConsolidationConfig': {
            'AnnotationConsolidationLambdaArn': 'arn:aws:lambda:us-east-1:432418664414:function:ACS-NamedEntityRecognition'
        },
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
```

### 在标签类别配置文件中提供工作人员说明
<a name="worker-instructions-ner"></a>

必须在用 `CreateLabelingJob` 中的 `LabelCategoryConfigS3Uri` 参数标识的标签类别配置文件中提供工作人员说明。您可以使用这些说明提供有关您希望工作人员执行的任务的详细信息，便于他们高效地使用工具。

您可以分别使用 `instructions` 参数中的 `shortInstruction` 和 `fullInstruction` 提供简短和详细的说明。要了解有关这些说明类型的更多信息，请参阅[创建说明页](sms-creating-instruction-pages.md)。

下面是一个标签类别配置文件示例，其中包含可用于命名实体识别标注作业的说明。

```
{
  "document-version": "2018-11-28",
  "labels": [
    {
      "label": "label1",
      "shortDisplayName": "L1"
    },
    {
      "label": "label2",
      "shortDisplayName": "L2"
    },
    {
      "label": "label3",
      "shortDisplayName": "L3"
    },
    {
      "label": "label4",
      "shortDisplayName": "L4"
    },
    {
      "label": "label5",
      "shortDisplayName": "L5"
    }
  ],
  "instructions": {
    "shortInstruction": "<p>Enter description of the labels that workers have 
                        to choose from</p><br><p>Add examples to help workers understand the label</p>",
    "fullInstruction": "<ol>
                        <li><strong>Read</strong> the text carefully.</li>
                        <li><strong>Highlight</strong> words, phrases, or sections of the text.</li>
                        <li><strong>Choose</strong> the label that best matches what you have highlighted.</li>
                        <li>To <strong>change</strong> a label, choose highlighted text and select a new label.</li>
                        <li>To <strong>remove</strong> a label from highlighted text, choose the X next to the 
                        abbreviated label name on the highlighted text.</li>
                        <li>You can select all of a previously highlighted text, but not a portion of it.</li>
                        </ol>"
  }
}
```

## 命名实体识别输出数据
<a name="sms-ner-output-data"></a>

创建命名实体识别标注作业后，输出数据将位于使用 API 时在 `S3OutputPath` 参数中指定的 Amazon S3 存储桶中，或控制台的**作业概览**部分的**输出数据集位置**字段中。

要了解有关 Ground Truth 生成的输出清单文件以及 Ground Truth 用来存储输出数据的文件结构的更多信息，请参阅[标注作业输出数据](sms-data-output.md)。

# 通过文本分类（单标签）对文本进行分类
<a name="sms-text-classification"></a>

要将文章和文本分类为预定义类别，请使用文本分类。例如，您可以使用文本分类来识别评论中传达的情绪或文本部分背后的情绪。使用 Amazon G SageMaker round Truth 文本分类，让工作人员将文本按您定义的类别进行分类。您可以使用 Amazon A SageMaker I 控制台的 Ground Truth 部分或[https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateLabelingJob.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateLabelingJob.html)操作创建文本分类标签任务。

**重要**  
如果您手动创建输入清单文件，请使用 `"source"` 来识别要标注的文本。有关更多信息，请参阅 [输入数据](sms-data-input.md)。

## 创建文本分类标注作业（控制台）
<a name="sms-creating-text-classification-console"></a>

您可以按照说明学习[创建标注作业（控制台）](sms-create-labeling-job-console.md)如何在 SageMaker AI 控制台中创建文本分类标注作业。在步骤 10 中，从**任务类别**下拉菜单中选择**文本**，然后选择**文本分类（单标签）**作为任务类型。

Ground Truth 为标注任务提供类似于以下内容的工作人员 UI。使用控制台创建标注作业时，需要指定说明，以便于工作人员完成工作人员可以从中选择的作业和标签。

![\[Gif 显示了如何在 A SageMaker I 控制台中创建文本分类标注作业。\]](http://docs.aws.amazon.com/zh_cn/sagemaker/latest/dg/images/sms/gifs/single-label-text.gif)


## 创建文本分类标注作业 (API)
<a name="sms-creating-text-classification-api"></a>

要创建文本分类标注作业，请使用 SageMaker API 操作`CreateLabelingJob`。此 API 为所有人定义了此操作 AWS SDKs。要查看此操作 SDKs 支持的特定语言列表，请查看的 “**另请参阅**” 部分。[https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateLabelingJob.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateLabelingJob.html)

请按照[创建标注作业 (API)](sms-create-labeling-job-api.md)中的说明进行操作，并在配置请求时执行以下操作：
+ 此任务类型的注释前 Lambda 函数以 `PRE-TextMultiClass` 结尾。要查找您所在地区的预注释 Lambda ARN，请参阅。[PreHumanTaskLambdaArn](https://docs.aws.amazon.com/sagemaker/latest/dg/API_HumanTaskConfig.html#SageMaker-Type-HumanTaskConfig-PreHumanTaskLambdaArn)
+ 此任务类型的注释合并 Lambda 函数以 `ACS-TextMultiClass` 结尾。要查找您所在地区的注释合并 Lambda ARN，请参阅。[AnnotationConsolidationLambdaArn](https://docs.aws.amazon.com/sagemaker/latest/dg/API_AnnotationConsolidationConfig.html#SageMaker-Type-AnnotationConsolidationConfig-AnnotationConsolidationLambdaArn)

以下是一个 [AWS Python SDK (Boto3) 请求](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/sagemaker.html#SageMaker.Client.create_labeling_job)示例，该请求在美国东部（弗吉尼亚州北部）区域中创建标注作业。所有红色参数都应替换为您的规范和资源。

```
response = client.create_labeling_job(
    LabelingJobName='example-text-classification-labeling-job,
    LabelAttributeName='label',
    InputConfig={
        'DataSource': {
            'S3DataSource': {
                'ManifestS3Uri': 's3://bucket/path/manifest-with-input-data.json'
            }
        },
        'DataAttributes': {
            'ContentClassifiers': [
                'FreeOfPersonallyIdentifiableInformation'|'FreeOfAdultContent',
            ]
        }
    },
    OutputConfig={
        'S3OutputPath': 's3://bucket/path/file-to-store-output-data',
        'KmsKeyId': 'string'
    },
    RoleArn='arn:aws:iam::*:role/*,
    LabelCategoryConfigS3Uri='s3://bucket/path/label-categories.json',
    StoppingConditions={
        'MaxHumanLabeledObjectCount': 123,
        'MaxPercentageOfInputDatasetLabeled': 123
    },
    HumanTaskConfig={
        'WorkteamArn': 'arn:aws:sagemaker:region:*:workteam/private-crowd/*',
        'UiConfig': {
            'UiTemplateS3Uri': 's3://bucket/path/worker-task-template.html'
        },
        'PreHumanTaskLambdaArn': 'arn:aws:lambda:us-east-1:432418664414:function:PRE-TextMultiClass,
        'TaskKeywords': [
            Text classification',
        ],
        'TaskTitle': Text classification task',
        'TaskDescription': 'Carefully read and classify this text using the categories provided.',
        'NumberOfHumanWorkersPerDataObject': 123,
        'TaskTimeLimitInSeconds': 123,
        'TaskAvailabilityLifetimeInSeconds': 123,
        'MaxConcurrentTaskCount': 123,
        'AnnotationConsolidationConfig': {
            'AnnotationConsolidationLambdaArn': 'arn:aws:lambda:us-east-1:432418664414:function:ACS-TextMultiClass'
        },
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
```

### 为文本分类标注作业提供模板
<a name="worker-template-text-classification"></a>

如果要使用 API 创建标注作业，必须在 `UiTemplateS3Uri` 中提供工作人员任务模板。复制并修改以下模板。仅修改 [https://docs.aws.amazon.com/sagemaker/latest/dg/sms-creating-instruction-pages.html#sms-creating-quick-instructions](https://docs.aws.amazon.com/sagemaker/latest/dg/sms-creating-instruction-pages.html#sms-creating-quick-instructions)、[https://docs.aws.amazon.com/sagemaker/latest/dg/sms-creating-instruction-pages.html#sms-creating-full-instructions](https://docs.aws.amazon.com/sagemaker/latest/dg/sms-creating-instruction-pages.html#sms-creating-full-instructions) 和 `header`。

将此模板上传到 S3，并在 `UiTemplateS3Uri` 中为此文件提供 S3 URI。

```
<script src="https://assets.crowd.aws/crowd-html-elements.js"></script>
<crowd-form>
  <crowd-classifier
    name="crowd-classifier"
    categories="{{ task.input.labels | to_json | escape }}"
    header="classify text"
  >
    <classification-target style="white-space: pre-wrap">
      {{ task.input.taskObject }}
    </classification-target>
    <full-instructions header="Classifier instructions">
      <ol><li><strong>Read</strong> the text carefully.</li>
      <li><strong>Read</strong> the examples to understand more about the options.</li>
      <li><strong>Choose</strong> the appropriate labels that best suit the text.</li></ol>
    </full-instructions>
    <short-instructions>
      <p>Enter description of the labels that workers have to choose from</p>
      <p><br></p><p><br></p><p>Add examples to help workers understand the label</p>
      <p><br></p><p><br></p><p><br></p><p><br></p><p><br></p>
    </short-instructions>
  </crowd-classifier>
  </crowd-form>
```

## 文本分类输出数据
<a name="sms-text-classification-output-data"></a>

创建文本分类标注作业后，输出数据将位于使用 API 时在 `S3OutputPath` 参数中指定的 Amazon S3 存储桶中，或者位于控制台的**作业概览**部分的**输出数据集位置**字段中。

要了解有关 Ground Truth 生成的输出清单文件以及 Ground Truth 用来存储输出数据的文件结构的更多信息，请参阅[标注作业输出数据](sms-data-output.md)。

要查看来自文本分类标注作业的输出清单文件示例，请参阅[分类作业输出](sms-data-output.md#sms-output-class)。

# 通过文本分类（多标签）对文本进行分类
<a name="sms-text-classification-multilabel"></a>

要将文章和文本分类为多个预定义类别，请使用多标签文本分类任务类型。例如，您可以使用此任务类型来识别在文本中传达的多种情感。以下各节将介绍如何通过管理控制台和 API 创建多标签文本分类任务。

在处理多标签文本分类任务时，工作人员应选择所有适用的标签，且必须至少选择一个标签。使用此任务类型创建作业时，您最多可提供 50 个标签类别。

当所有标签都不适用时，Amazon G SageMaker round Truth 不提供 “无” 类别。要向工作人员提供此选项，请在创建多标签文本分类作业时，包含类似于“无”或“其他”的标签。

若要限制工作人员为每个文档或文本选择单个标签，请使用 [通过文本分类（单标签）对文本进行分类](sms-text-classification.md) 任务类型。

**重要**  
如果您手动创建输入清单文件，请使用 `"source"` 来识别要标注的文本。有关更多信息，请参阅 [输入数据](sms-data-input.md)。

## 创建多标签文本分类标注作业（控制台）
<a name="sms-creating-multilabel-text-classification-console"></a>

您可以按照说明学习[创建标注作业（控制台）](sms-create-labeling-job-console.md)如何在 Amazon A SageMaker I 控制台中创建多标签文本分类标注任务。在步骤 10 中，从**任务类别**下拉菜单中选择**文本**，然后选择**文本分类（多标签）**作为任务类型。

Ground Truth 为标注任务提供类似于以下内容的工作人员 UI。使用控制台创建标注作业时，需要指定说明，以便于工作人员完成工作人员可以从中选择的作业和标签。

![\[Gif 展示了如何在 Amazon A SageMaker I 控制台中创建多标签文本分类标签任务。\]](http://docs.aws.amazon.com/zh_cn/sagemaker/latest/dg/images/sms/gifs/multi-label-text.gif)


## 创建多标签文本分类标注作业 (API)
<a name="sms-creating-multilabel-text-classification-api"></a>

要创建多标签文本分类标注作业，请使用 SageMaker API 操作`CreateLabelingJob`。此 API 为所有人定义了此操作 AWS SDKs。要查看此操作 SDKs 支持的特定语言列表，请查看的 “**另请参阅**” 部分。[https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateLabelingJob.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateLabelingJob.html)

请按照[创建标注作业 (API)](sms-create-labeling-job-api.md)中的说明进行操作，并在配置请求时执行以下操作：
+ 此任务类型的注释前 Lambda 函数以 `PRE-TextMultiClassMultiLabel` 结尾。要查找您所在地区的预注释 Lambda ARN，请参阅。[PreHumanTaskLambdaArn](https://docs.aws.amazon.com/sagemaker/latest/dg/API_HumanTaskConfig.html#SageMaker-Type-HumanTaskConfig-PreHumanTaskLambdaArn)
+ 此任务类型的注释合并 Lambda 函数以 `ACS-TextMultiClassMultiLabel` 结尾。要查找您所在地区的注释合并 Lambda ARN，请参阅。[AnnotationConsolidationLambdaArn](https://docs.aws.amazon.com/sagemaker/latest/dg/API_AnnotationConsolidationConfig.html#SageMaker-Type-AnnotationConsolidationConfig-AnnotationConsolidationLambdaArn)

以下是一个 [AWS Python SDK (Boto3) 请求](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/sagemaker.html#SageMaker.Client.create_labeling_job)示例，该请求在美国东部（弗吉尼亚州北部）区域中创建标注作业。所有红色参数都应替换为您的规范和资源。

```
response = client.create_labeling_job(
    LabelingJobName='example-multi-label-text-classification-labeling-job,
    LabelAttributeName='label',
    InputConfig={
        'DataSource': {
            'S3DataSource': {
                'ManifestS3Uri': 's3://bucket/path/manifest-with-input-data.json'
            }
        },
        'DataAttributes': {
            'ContentClassifiers': [
                'FreeOfPersonallyIdentifiableInformation'|'FreeOfAdultContent',
            ]
        }
    },
    OutputConfig={
        'S3OutputPath': 's3://bucket/path/file-to-store-output-data',
        'KmsKeyId': 'string'
    },
    RoleArn='arn:aws:iam::*:role/*,
    LabelCategoryConfigS3Uri='s3://bucket/path/label-categories.json',
    StoppingConditions={
        'MaxHumanLabeledObjectCount': 123,
        'MaxPercentageOfInputDatasetLabeled': 123
    },
    HumanTaskConfig={
        'WorkteamArn': 'arn:aws:sagemaker:region:*:workteam/private-crowd/*',
        'UiConfig': {
            'UiTemplateS3Uri': 's3://bucket/path/custom-worker-task-template.html'
        },
        'PreHumanTaskLambdaArn': 'arn:aws:lambda::function:PRE-TextMultiClassMultiLabel,
        'TaskKeywords': [
            'Text Classification',
        ],
        'TaskTitle': 'Multi-label text classification task',
        'TaskDescription': 'Select all labels that apply to the text shown',
        'NumberOfHumanWorkersPerDataObject': 123,
        'TaskTimeLimitInSeconds': 123,
        'TaskAvailabilityLifetimeInSeconds': 123,
        'MaxConcurrentTaskCount': 123,
        'AnnotationConsolidationConfig': {
            'AnnotationConsolidationLambdaArn': 'arn:aws:lambda:us-east-1:432418664414:function:ACS-TextMultiClassMultiLabel'
        },
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
```

### 为多标签文本分类创建模板
<a name="custom-template-multi-label-text-classification"></a>

如果要使用 API 创建标注作业，必须在 `UiTemplateS3Uri` 中提供工作人员任务模板。复制并修改以下模板。仅修改 [https://docs.aws.amazon.com/sagemaker/latest/dg/sms-creating-instruction-pages.html#sms-creating-quick-instructions](https://docs.aws.amazon.com/sagemaker/latest/dg/sms-creating-instruction-pages.html#sms-creating-quick-instructions)、[https://docs.aws.amazon.com/sagemaker/latest/dg/sms-creating-instruction-pages.html#sms-creating-full-instructions](https://docs.aws.amazon.com/sagemaker/latest/dg/sms-creating-instruction-pages.html#sms-creating-full-instructions) 和 `header`。

将此模板上传到 S3，并在 `UiTemplateS3Uri` 中为此文件提供 S3 URI。

```
<script src="https://assets.crowd.aws/crowd-html-elements.js"></script>
<crowd-form>
  <crowd-classifier-multi-select
    name="crowd-classifier-multi-select"
    categories="{{ task.input.labels | to_json | escape }}"
    header="Please identify all classes in the below text"
  >
    <classification-target style="white-space: pre-wrap">
      {{ task.input.taskObject }}
    </classification-target>
    <full-instructions header="Classifier instructions">
      <ol><li><strong>Read</strong> the text carefully.</li>
      <li><strong>Read</strong> the examples to understand more about the options.</li>
      <li><strong>Choose</strong> the appropriate labels that best suit the text.</li></ol>
    </full-instructions>
    <short-instructions>
      <p>Enter description of the labels that workers have to choose from</p>
      <p><br></p>
      <p><br></p><p>Add examples to help workers understand the label</p>
      <p><br></p><p><br></p><p><br></p><p><br></p><p><br></p>
    </short-instructions>
  </crowd-classifier-multi-select>
  </crowd-form>
```

要了解如何创建自定义模板，请参阅[自定义标注工作流程](sms-custom-templates.md)。

## 多标签文本分类输出数据
<a name="sms-text-classification-multi-select-output-data"></a>

创建多标签图像分类标注作业后，输出数据将位于使用 API 时在 `S3OutputPath` 参数中指定的 Amazon S3 存储桶中，或者位于控制台的**作业概览**部分的**输出数据集位置**字段中。

要了解有关 Ground Truth 生成的输出清单文件以及 Ground Truth 用来存储输出数据的文件结构的更多信息，请参阅[标注作业输出数据](sms-data-output.md)。

要查看多标签文本分类标注作业的输出清单文件示例，请参阅[多标签分类作业输出](sms-data-output.md#sms-output-multi-label-classification)。