public class AipKnowledgeGraphic extends BaseClient
accessToken, aipKey, aipToken, appId, config, expireDate, isAuthorized, isBceKey, LOGGER, state| 构造器和说明 |
|---|
AipKnowledgeGraphic(String appId,
String apiKey,
String secretKey) |
| 限定符和类型 | 方法和说明 |
|---|---|
org.json.JSONObject |
createTask(String name,
String templateContent,
String inputMappingFile,
String outputFile,
String urlPattern,
HashMap<String,String> options)
创建任务接口
创建一个新的信息抽取任务
|
org.json.JSONObject |
getTaskInfo(int id,
HashMap<String,String> options)
获取任务详情接口
根据任务id获取单个任务的详细信息
|
org.json.JSONObject |
getTaskStatus(int id,
HashMap<String,String> options)
查询任务状态接口
查询指定的任务的最新执行状态
|
org.json.JSONObject |
getUserTasks(HashMap<String,String> options)
以分页的方式查询当前用户所有的任务信息接口
该请求用于菜品识别。
|
org.json.JSONObject |
startTask(int id,
HashMap<String,String> options)
启动任务接口
启动一个已经创建的信息抽取任务
|
org.json.JSONObject |
updateTask(int id,
HashMap<String,String> options)
更新任务接口
更新任务配置,在任务重新启动后生效
|
getAccessToken, needAuth, postOperation, preOperation, preOperation, requestServer, setConnectionTimeoutInMillis, setHttpProxy, setSocketProxy, setSocketTimeoutInMillispublic org.json.JSONObject createTask(String name, String templateContent, String inputMappingFile, String outputFile, String urlPattern, HashMap<String,String> options)
name - - 任务名字templateContent - - json string 解析模板内容inputMappingFile - - 抓取结果映射文件的路径outputFile - - 输出文件名字urlPattern - - url patternoptions - - 可选参数对象,key: value都为string类型
options - options列表:
limit_count 限制解析数量limit_count为0时进行全量任务,limit_count>0时只解析limit_count数量的页面public org.json.JSONObject updateTask(int id,
HashMap<String,String> options)
id - - 任务IDoptions - - 可选参数对象,key: value都为string类型
options - options列表:
name 任务名字
template_content json string 解析模板内容
input_mapping_file 抓取结果映射文件的路径
url_pattern url pattern
output_file 输出文件名字public org.json.JSONObject getTaskInfo(int id,
HashMap<String,String> options)
id - - 任务IDoptions - - 可选参数对象,key: value都为string类型
options - options列表:public org.json.JSONObject getUserTasks(HashMap<String,String> options)
options - - 可选参数对象,key: value都为string类型
options - options列表:
id 任务ID,精确匹配
name 中缀模糊匹配,abc可以匹配abc,aaabc,abcde等
status 要筛选的任务状态
page 页码
per_page 页码public org.json.JSONObject startTask(int id,
HashMap<String,String> options)
id - - 任务IDoptions - - 可选参数对象,key: value都为string类型
options - options列表:Copyright © 2024. All rights reserved.