tjt 1 tahun lalu
induk
melakukan
17e398a7ce
3 mengubah file dengan 25 tambahan dan 5 penghapusan
  1. 1 1
      ir_db_establish.py
  2. 0 4
      retrieval_start.sh
  3. 24 0
      server_start.sh

+ 1 - 1
ir_db_establish.py

@@ -37,7 +37,7 @@ class Inverted_Index_Establish():
         for i,data in enumerate(origin_dataset):
             if "content_clear" not in data:
                 continue
-            seg_list = self.word_seg(data["content_clear"])
+            seg_list, _ = self.word_seg(data["content_clear"])
             # 计算每篇文档长度和总文档长度
             doc_length = len(seg_list)
             all_doc_length += doc_length

+ 0 - 4
retrieval_start.sh

@@ -1,4 +0,0 @@
-# !/bin/bash
-# 启动方式: bash -i asr_restart.sh/source asr_restart.sh
-conda activate dup_search
-python restart_server.py

+ 24 - 0
server_start.sh

@@ -0,0 +1,24 @@
+# 启动方式: bash -i server_start.sh
+# sudo password: 123456
+# mongodb服务
+pid=`ps ax|grep mongod|grep -v grep|awk '{print $1}'`
+if [ -z ${pid} ]; then
+    sudo mongod -f /etc/mongodb.conf --fork
+fi
+
+# CV服务
+sudo supervisorctl start all
+
+# NLP服务
+cd /home/fxb/Shmeea/NLP/physics_repeat_check
+conda activate dup_search
+python restart_server.py
+
+# 前端服务
+cd /home/fxb/ksy/ksy_pages/backend/ksy_chachong_release
+conda activate ksy_pages
+pid=`ps ax|grep ksy_query_topic.py|grep -v grep|awk '{print $1}'`
+if [ -z ${pid} ]; then
+    sudo service nginx start
+    nohup python3 ksy_query_topic.py &
+fi