tjt 1 year ago
parent
commit
22334e3749
2 changed files with 19 additions and 20 deletions
  1. 19 19
      config.py
  2. 0 1
      main_clear/sci_clear.py

+ 19 - 19
config.py

@@ -5,13 +5,13 @@ import logging
 import pymongo
 import pymongo
 
 
 # 建立mongodb连接
 # 建立mongodb连接
-# myclient = pymongo.MongoClient("mongodb://192.168.1.140:27017/")
-myclient = pymongo.MongoClient(
-    # host="49.232.97.180",
-    host="10.19.1.2",
-    port=8888,
-    username="root",
-    password="oyiqd!oy@wxc=ykw@2*jei!")
+myclient = pymongo.MongoClient("mongodb://192.168.1.140:27017/")
+# myclient = pymongo.MongoClient(
+#     # host="49.232.97.180",
+#     host="10.19.1.2",
+#     port=8888,
+#     username="root",
+#     password="oyiqd!oy@wxc=ykw@2*jei!")
 mongo_info_db = myclient["math_tk"]
 mongo_info_db = myclient["math_tk"]
 mongo_coll_cloud = mongo_info_db['cloud_topic']
 mongo_coll_cloud = mongo_info_db['cloud_topic']
 mongo_coll_school = mongo_info_db['school_topic']
 mongo_coll_school = mongo_info_db['school_topic']
@@ -19,25 +19,25 @@ mongo_coll_school = mongo_info_db['school_topic']
 mongo_coll_list = [mongo_coll_cloud, mongo_coll_school]
 mongo_coll_list = [mongo_coll_cloud, mongo_coll_school]
 
 
 # 建立mysql连接
 # 建立mysql连接
+mysqldb = {
+    "host": '192.168.1.232',
+    "user": 'mysql_dev',
+    "password": 'mydb_3307',
+    "db": 'zsy_tk',
+    "charset": 'utf8mb4'
+}
 # mysqldb = {
 # mysqldb = {
-#     "host": '192.168.1.210',
+#     # "host": '10.19.63.195',
+#     "host": '172.16.5.14',
 #     "user": 'zsy',
 #     "user": 'zsy',
-#     "password": '9X3zV4AP8m5xvYUL',
+#     "password": 'Hbt3sZNxepnZQNPU',
 #     "db": 'zsy_tk',
 #     "db": 'zsy_tk',
 #     "charset": 'utf8mb4'
 #     "charset": 'utf8mb4'
 # }
 # }
-mysqldb = {
-    # "host": '10.19.63.195',
-    "host": '172.16.5.14',
-    "user": 'zsy',
-    "password": 'Hbt3sZNxepnZQNPU',
-    "db": 'zsy_tk',
-    "charset": 'utf8mb4'
-}
 
 
 # 图片公式识别链接
 # 图片公式识别链接
-# formula_url = r"http://192.168.1.208:8000/segment/formula/"
-formula_url = r"http://10.19.1.11:7080/segment/formula/"
+formula_url = r"http://192.168.1.208:8000/segment/formula/"
+# formula_url = r"http://10.19.1.11:7080/segment/formula/"
 
 
 # mongodb句向量训练标志
 # mongodb句向量训练标志
 sent_train_flag = 1
 sent_train_flag = 1

+ 0 - 1
main_clear/sci_clear.py

@@ -78,7 +78,6 @@ def escape_func(s):
     # 部分指令特殊处理
     # 部分指令特殊处理
     s = s.replace(r'*-*', '')
     s = s.replace(r'*-*', '')
     s = s.replace(r'\[', '')
     s = s.replace(r'\[', '')
-    s = s.replace(r'\[', '')
     s = s.replace(r'\]', '')
     s = s.replace(r'\]', '')
     s = s.replace(r"\lt", "<")
     s = s.replace(r"\lt", "<")
     s = s.replace(r"\gt", ">")
     s = s.replace(r"\gt", ">")