Ver código fonte

阿里云调用fool报错,改为调用selffool

lsm 2 anos atrás
pai
commit
92f4a6c339
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      BiddingKG/dl/interface/predictor.py

+ 2 - 2
BiddingKG/dl/interface/predictor.py

@@ -25,7 +25,7 @@ from bs4 import BeautifulSoup
 import copy
 import calendar
 import datetime
-import fool
+# import fool   # 统一用 selffool ,阿里云上只有selffool 包
 
 from threading import RLock
 dict_predictor = {"codeName":{"predictor":None,"Lock":RLock()},
@@ -3497,7 +3497,7 @@ class IndustryPredictor():
             '', text)
         text = text.replace(tenderee, '')
         text = ' ' if text=="" else text
-        words_docs_list = fool.cut(text)
+        words_docs_list = selffool.cut(text)
         words_docs_list = [[it for it in l if re.search('^[\u4e00-\u9fa5]+$', it)][-maxSententLen:] for l in words_docs_list]
         array = embedding(words_docs_list, shape=(len(words_docs_list), maxSententLen, 128))
         return array