- 请求示例,以HDFS为例子,如需其他类型的文件输入输出系统,请联系算法平台同事
curl -XPOST -H 'Content-Type: application/json' \ -H 'Authorization: your token here' \ -d '{ "inputFileSystemInfo": { "fileSystemType": "HDFS" "port": "your_hdfs_namenode_httpserver_port", "userName": "your_hdfs_userName", "host": "your_hdfs_namenode_httpserver_host", "spareHost": "your_hdfs_SecondaryNameNode_host", "inputPath": "your_input_path_here" }, "outputFileSystemInfo": { "fileSystemType": "HDFS" "port": "your_hdfs_namenode_httpserver_port", "userName": "your_hdfs_userName", "host": "your_hdfs_namenode_httpserver_host", "spareHost": "your_hdfs_SecondaryNameNode_host", "outputPath": "your_output_path_here" }, "mailAddress": "your email here" }' https://open.datastory.com.cn/api/algorithm/triple/cosmetics/add
- 说明
- 请求头Authorization的token请联系算法平台同事提供
- inputFileSystemInfo、outputFileSystemInfo为输入输出文件的信息
- fileSystemType:填HDFS,如需其他类型的文件作为输入输出系统,请联系算法平台同事
- inputPath:输入文件路径
- outputPath:输出文件路径
- mailAddress:邮箱地址。用于接收任务状态的邮件,当任务异常、任务被取消会以邮件的形式发送到该邮箱地址。
- 输入文件,每一行都是一个json,示例如下:
{"data":{"Text":"这里填待分析的文本","Id":"your_bussiness_id"}}
- 输出文件,每一行都是一个json
示例及说明[ { "extractorName": "美妆日化", // 领域名称 "dimension": "感官", // 一级维度 "property": "材质", // 二级维度 "feature": "粉质", // 特征词 "sentiment": "细腻", // 情感词 "featureAndSentiment": "粉质很细腻", // 特征词+情感词 "featureAndSentimentForCount": "粉质细腻", // 特征词+情感词,去除其中的程度副词部分 "originalSentiment": "细腻", // 原始情感词 "polarity": "正面", // 情感极性 "description": "品类_睫毛膏" // 实体类型_实体名称,仅当传入Label字段时此字段有效 }, { "extractorName": "美妆日化", "dimension": "感官", "property": "外观", "feature": "颜值", "sentiment": "绝美", "featureAndSentiment": "颜值绝美", "featureAndSentimentForCount": "颜值绝美", "originalSentiment": "绝美", "polarity": "正面", "description": "" } ]
- 返回结果:任务id。可凭此id请求【查询任务状态】接口