communications-mining
latest
false
重要 :
请注意,此内容已使用机器翻译进行了本地化。
Communications Mining 开发者指南
Last updated 2024年9月27日

批量下载

CLI 允许您批量下载注释和预测。 这对于将脚本导入到不需要实时连接的分析工具中非常有用。

注意:本节假定您已安装配置CLI。

下载带有预测的注释

下面的命令将下载指定源和数据集中的所有注释预测。 请注意,数据集名称和源名称必须以其所在项目的名称作为前缀。 如果数据集包含多个源,您需要对每个源发出此命令,以下载数据集中的所有注释。

re get comments project/source-name --dataset project/dataset-name --predictions=true -f output.jsonlre get comments project/source-name --dataset project/dataset-name --predictions=true -f output.jsonl

CLI 使用哪个模型版本来获取预测?

CLI 将下载最新的可用计算预测。 这些预测与用户界面中显示的预测相同。

重要提示:是否可以将特定的模型版本传递给 CLI?

If you need predictions from a specific model version, consider using the or the predict API routes.

正在处理数据

注意:与 API 相同,CLI 返回带有置信度分数的预测标签。 为了正确处理置信度分数,请务必查看标签文档的“在自动化使用标签”和“在分析中使用标签”部分。

CLI 以 JSONL 格式(也称为换行符分隔的 JSON)返回数据,其中每一行都是一个 JSON 值。 许多工具都可以直接处理 JSONL 文件。 如果您有任何问题,请联系支持团队。

JSONL 文件中的每一行将具有以下格式:

{
  "comment": {...},
  "annotating": {
    "assigned": [...]
    "predicted": [...]
  },
  "entities": {
    "assigned": [...]
    "predicted": [...]
  }
}{
  "comment": {...},
  "annotating": {
    "assigned": [...]
    "predicted": [...]
  },
  "entities": {
    "assigned": [...]
    "predicted": [...]
  }
}
字段名称说明
comment注释对象的格式如此所述。
annotating.assigned已分配标签的列表,采用此处描述的格式。
entities.assigned已分配实体的列表,采用此处描述的格式。
annotating.predicted预测标签列表,采用此处描述的格式。
entities.predicted预测实体列表,采用此处所述的格式。
请注意,如果注释既没有分配也没有预测的标签或实体,则annotatingentities字段可能完全不存在。

以下是一个注释示例,其中包含从现实数据集中下载的预测。

{
  "comment": {
    "id": "1234abcd",
    "uid": "5678ef.1234abdc",
    "timestamp": "2021-02-01T00:00:00Z",
    "messages": [
      {
        "body": {
          "text": "The hot chocolate biscuit on arrival raised my expectations"
        }
      }
    ],
    "user_properties": {
      "string:Question": "What did you like about your stay",
      "number:Reviewer Score": 5.4,
      "number:Average Score": 8.4,
      "number:Reviewer Total Number Of Reviews": 1,
      "string:Hotel Name": "DoubleTree by Hilton London Victoria"
    },
    "created_at": "2021-02-01T00:00:00Z"
  },
  "annotating": {
    "predicted": [
      {
        "name": "Refreshments",
        "sentiment": 0.3598046874571062,
        "probability": 0.54764723591506481
      },
      {
        "name": "Property",
        "sentiment": 0.6684685489411859,
        "probability": 0.417815982922911644
      }
    ]
  }
}{
  "comment": {
    "id": "1234abcd",
    "uid": "5678ef.1234abdc",
    "timestamp": "2021-02-01T00:00:00Z",
    "messages": [
      {
        "body": {
          "text": "The hot chocolate biscuit on arrival raised my expectations"
        }
      }
    ],
    "user_properties": {
      "string:Question": "What did you like about your stay",
      "number:Reviewer Score": 5.4,
      "number:Average Score": 8.4,
      "number:Reviewer Total Number Of Reviews": 1,
      "string:Hotel Name": "DoubleTree by Hilton London Victoria"
    },
    "created_at": "2021-02-01T00:00:00Z"
  },
  "annotating": {
    "predicted": [
      {
        "name": "Refreshments",
        "sentiment": 0.3598046874571062,
        "probability": 0.54764723591506481
      },
      {
        "name": "Property",
        "sentiment": 0.6684685489411859,
        "probability": 0.417815982922911644
      }
    ]
  }
}
  • 下载带有预测的注释
  • 正在处理数据

此页面有帮助吗?

获取您需要的帮助
了解 RPA - 自动化课程
UiPath Community 论坛
Uipath Logo White
信任与安全
© 2005-2024 UiPath。保留所有权利。