From b8e3d55a57f37aafd8784bbd9a2dcc71c9de5078 Mon Sep 17 00:00:00 2001 From: yz <3614508250@qq.com> Date: Mon, 29 May 2023 14:47:52 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=8D=E6=80=A7=E6=A0=87=E6=B3=A8=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/DocInfoController.java | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/ruoyi-biemo/src/main/java/com/ruoyi/biemo/business/controller/DocInfoController.java b/ruoyi-biemo/src/main/java/com/ruoyi/biemo/business/controller/DocInfoController.java index 98c73b3..cb2da75 100644 --- a/ruoyi-biemo/src/main/java/com/ruoyi/biemo/business/controller/DocInfoController.java +++ b/ruoyi-biemo/src/main/java/com/ruoyi/biemo/business/controller/DocInfoController.java @@ -128,6 +128,43 @@ public class DocInfoController extends BaseController { return AjaxResult.success("查询成功",result); } + @PostMapping("/getInfoDelHtmlByContent") + public AjaxResult getInfoDelHtmlByContent(@RequestBody String content) throws IOException { + JSONObject result = new JSONObject(); + content = MyObjects.delHTMLTag(content); + content = MyObjects.delSpace(content); + JSONArray labels = new JSONArray(); + result.put("content",content); + result.put("connections",new JSONArray()); + result.put("connectionCategories",MyObjects.connectionCategories); + result.put("labelCategories",MyObjects.labelCategories); + Sentence sentence = DependencyParserUtils.nerAnalysis(content); + List wordList = sentence.wordList; + if(wordList!=null&&wordList.size()>0){ + int offset = 0; + int id = 0; + for(int i=0;i