tjt 1 год назад
Родитель
Сommit
17e398a7ce
3 измененных файлов с 25 добавлено и 5 удалено
  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