knowledgeExtraction.js 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. import { get, post, deletes, put } from '@/http/index'
  2. // 查看抽取任务列表
  3. export const getTaskList = async (data) => {
  4. return await get('/als/kGraphTask/list', data)
  5. }
  6. // 新增任务
  7. export const addTask = async (data) => {
  8. return await post('/als/kGraphTask', data)
  9. }
  10. // 修改任务
  11. export const updateTask = async (data) => {
  12. return await put('/als/kGraphTask', data)
  13. }
  14. // 删除任务
  15. export const removeTask = async (id) => {
  16. return await deletes('/als/kGraphTask/' + id)
  17. }
  18. // 获取文件信息
  19. export const getTaskInfo = async (id) => {
  20. return await get('/als/kGraphTask/' + id)
  21. }
  22. // 执行知识图谱的类型
  23. export const taskPro = async (data) => {
  24. return await post('/als/kGraphTask/pro', data)
  25. }
  26. // 获取分句列表
  27. export const getClauseList = async (data) => {
  28. return await get('/als/kGraphClause/list', data)
  29. }
  30. // 获取分句详细信息
  31. export const getClauseInfo = async (id) => {
  32. return await get('/als/kGraphClause/' + id)
  33. }
  34. // 删除分句
  35. export const removeClause = async (id) => {
  36. return await deletes('/als/kGraphClause/' + id)
  37. }
  38. // 修改分句
  39. export const updateClause = async (data) => {
  40. return await put('/als/kGraphClause', data)
  41. }
  42. // 获取抽取列表
  43. export const getExtractList = async (data) => {
  44. return await get('/als/kGraphEntity/list', data)
  45. }
  46. // 修改抽取结果
  47. export const updateExtractInfo = async (data) => {
  48. return await put('/als/kGraphEntity', data)
  49. }
  50. // 删除抽取结果
  51. export const removeExtractInfo = async (id) => {
  52. return await deletes('/als/kGraphEntity/' + id)
  53. }
  54. // 新增实体关系
  55. export const addER = async (data) => {
  56. return await post('/als/kGraphEntity', data)
  57. }