|
@@ -0,0 +1,39 @@
|
|
|
+package com.diagbot.web;
|
|
|
+
|
|
|
+import com.diagbot.annotation.SysLogger;
|
|
|
+import com.diagbot.dto.RespDTO;
|
|
|
+import com.diagbot.facade.NlpFacade;
|
|
|
+import com.diagbot.vo.NlpVO;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @Description: nlp控制层
|
|
|
+ * @author: zhoutg
|
|
|
+ * @time: 2018/8/30 10:12
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("/nlp")
|
|
|
+@Api(value = "NLP实体识别和关系抽取API", tags = { "NLP实体识别和关系抽取API" })
|
|
|
+@SuppressWarnings("unchecked")
|
|
|
+@Slf4j
|
|
|
+public class NlpController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private NlpFacade nlpFacade;
|
|
|
+
|
|
|
+ @ApiOperation(value = "获取实体识别和关系抽取结果[zhoutg]", notes = "")
|
|
|
+ @PostMapping("/getNlp")
|
|
|
+ @SysLogger("getNlp")
|
|
|
+ public RespDTO<String> getNlp(@RequestBody NlpVO nlpVO) {
|
|
|
+ return RespDTO.onSuc(nlpFacade.getNlp(nlpVO));
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
+
|