From 44dd23a4bbfc7dc2ed395db1587a15df6446fc29 Mon Sep 17 00:00:00 2001 From: zouap Date: Thu, 24 Feb 2022 15:51:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=94=A8=E6=88=B7=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E7=BB=93=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- public/home/search.js | 55 +++++++++++++++++++++++++++++++++++++++++-- routers/search.go | 1 + 2 files changed, 54 insertions(+), 2 deletions(-) diff --git a/public/home/search.js b/public/home/search.js index 79615c4f2..400b0eeb0 100644 --- a/public/home/search.js +++ b/public/home/search.js @@ -130,6 +130,49 @@ function displayPrResult(page,jsonResult,onlyReturnNum,keyword){ } } +var categoryDesc={ + "computer_vision":"计算机视觉", + "natural_language_processing":"自然语言处理", + "speech_processing":"语音处理", + "computer_vision_natural_language_processing":"计算机视觉、自然语言处理" +}; + +var taskDesc={ + "machine_translation":"机器翻译", + "question_answering_system":"问答系统", + "information_retrieval":"信息检索", + "knowledge_graph":"知识图谱", + "text_annotation":"文本标注", + "text_categorization":"文本分类", + "emotion_analysis":"情感分析", + "language_modeling":"语言建模", + "speech_recognition":"语音识别", + "automatic_digest":"自动文摘", + "information_extraction":"信息抽取", + "description_generation":"说明生成", + "image_classification":"图像分类", + "face_recognition":"人脸识别", + "image_search":"图像搜索", + "target_detection":"目标检测", + "image_description_generation":"图像描述生成", + "vehicle_license_plate_recognition":"车辆车牌识别", + "medical_image_analysis":"医学图像分析", + "unmanned":"无人驾驶", + "unmanned_security":"无人安防", + "drone":"无人机", + "vr_ar":"VR/AR", + "2_d_vision":"2-D视觉", + "2_5_d_vision":"2.5-D视觉", + "3_d_reconstruction":"3D重构", + "image_processing":"图像处理", + "video_processing":"视频处理", + "visual_input_system":"视觉输入系统", + "speech_coding":"语音编码", + "speech_enhancement":"语音增强", + "speech_recognition":"语音识别", + "speech_synthesis":"语音合成" +}; + function displayDataSetResult(page,jsonResult,onlyReturnNum,keyword){ var data = jsonResult.Result; var total = jsonResult.Total; @@ -152,6 +195,12 @@ function displayDataSetResult(page,jsonResult,onlyReturnNum,keyword){ html += "
"; html += "
"; html += "
" ; + if(!isEmpty(recordMap["category"])){ + html += " " +recordMap["category"]+ ""; + } + if(!isEmpty(recordMap["task"])){ + html += " " +recordMap["task"]+ ""; + } html += " " +recordMap["download_times"] + " "; html +="
"; html += "
"; @@ -159,8 +208,10 @@ function displayDataSetResult(page,jsonResult,onlyReturnNum,keyword){ html +=" "; html +="
"; html += "
"; - html += "

" + recordMap["description"] + "

"; - html += "

" + recordMap["file_name"] + "

"; + html += "

" + recordMap["title"] + "

"; + if(!isEmpty(recordMap["file_name"])){ + html += "

" + recordMap["file_name"] + "

"; + } html +="

"; html +=" 最后更新于 " + getTime(recordMap["created_unix"],currentTime) +""; html +="

"; diff --git a/routers/search.go b/routers/search.go index e403ecbb1..1d7a5b183 100644 --- a/routers/search.go +++ b/routers/search.go @@ -451,6 +451,7 @@ func makeDatasetResult(sRes *elastic.SearchResult, Key string, OnlyReturnNum boo record["description"] = "" } record["file_name"] = recordSource["file_name"] + record["task"] = recordSource["task"] record["download_times"] = recordSource["download_times"] record["created_unix"] = recordSource["created_unix"] result = append(result, record)