- 发行说明
- 在开始之前
- 入门指南
- 项目
- 数据集
- ML 包
- 管道
- ML 技能
- ML 日志
- AI Center 中的 Document Understanding
- 如何
- 将自定义命名实体识别与持续学习结合使用
- 基本故障排除指南
将自定义命名实体识别与持续学习结合使用
背景信息
本示例用于按研究论文中提及的类别提取化学物。按照以下过程提取化学物,并将其分类为 ABBREVIATION、FAMILY、FORMULA、IDENTIFIER、MULTIPLE、SYSTEMATIC、TRIVIAL 和 NO_CLASS。
先决条件
This procedure uses the Custom Named Entity Recognition package. For more information on how this package works and what it can be used for, see Custom Named Entity Recognition.
对于此过程,我们提供了如下示例文件:
-
Pre-labeled training dataset in CoNLL format. You can download it from here.
-
Pre-labeled test dataset. You can download it from here.
-
Sample workflow for extracting categories of chemicals mentioned in research papers. You can download it from here.
备注:确保填写示例文件中的以下变量:
in_emailAdress- Action Center 任务将分配到此电子邮件地址in_MLSkillEndpoint- ML 技能的公共端点in_MLSkillAPIKey- ML 技能的 API 密钥in_labelStudioEndpoint- 可选,用于启用连续标记:提供 Label Studio 项目的 导入 URL
程序
按照以下步骤,按研究论文中的类别提取化学物。
- Import the sample dataset in AI Center by going to the Datasets menu and uploading the train and test folder from the sample.
- 从“ML 包”>“开箱即用包”>“UiPath 语言分析”中选择所需的自定义命名实体识别包并创建。
- 转到“管道”菜单,然后为上一步中创建的包创建一个新的完整管道运行。指向示例文件中提供的训练数据集和测试数据集。
- 使用上一步中的管道运行生成的包创建新的 ML 技能并进行部署。
- Once the skill is deployed, leverage it in the UiPath Studio workflow provided. To enable capturing data with weak predictions, deploy a Label Studio instance and provide the instance URL and API key in the Label Studio activity in the workflow.
Label Studio 入门
要开始使用 Label Studio 并将数据导出至 AI Center,请按照以下说明操作。
-
Install Label Studio on your local machine or cloud instance. To do so, follow the instructions from here.
-
根据命名实体识别模板创建一个新项目,并定义“标签名称”。
-
确保标签名称没有特殊字符或空格。例如,使用
Set Date代替SetDate。 -
请确保
<Text>标签的值为"$text"。 -
Upload the data using the API from here.
cURL 请求示例:
curl --location --request POST 'https://<label-studio-instance>/api/projects/<id>/import' \)\) --header 'Content-Type: application/json' \)\) --header 'Authorization: Token <Token>' \)\) --data-raw '[ { "data": { "text": "<Text1>" }, }, { "data": { "text": "<Text2>" } } ]'curl --location --request POST 'https://<label-studio-instance>/api/projects/<id>/import' \)\) --header 'Content-Type: application/json' \)\) --header 'Authorization: Token <Token>' \)\) --data-raw '[ { "data": { "text": "<Text1>" }, }, { "data": { "text": "<Text2>" } } ]' -
标注数据。
-
以 CoNLL 2003 格式导出数据,并将其上传到 AI Center。
-
在提供的示例工作流中提供了 Label Studio 实例 URL 和 API 密钥,以捕获错误的预测和低可信度预测。