|
@@ -25,7 +25,7 @@ from bs4 import BeautifulSoup
|
|
import copy
|
|
import copy
|
|
import calendar
|
|
import calendar
|
|
import datetime
|
|
import datetime
|
|
-import fool
|
|
|
|
|
|
+# import fool # 统一用 selffool ,阿里云上只有selffool 包
|
|
|
|
|
|
from threading import RLock
|
|
from threading import RLock
|
|
dict_predictor = {"codeName":{"predictor":None,"Lock":RLock()},
|
|
dict_predictor = {"codeName":{"predictor":None,"Lock":RLock()},
|
|
@@ -3497,7 +3497,7 @@ class IndustryPredictor():
|
|
'', text)
|
|
'', text)
|
|
text = text.replace(tenderee, '')
|
|
text = text.replace(tenderee, '')
|
|
text = ' ' if text=="" else text
|
|
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]
|
|
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))
|
|
array = embedding(words_docs_list, shape=(len(words_docs_list), maxSententLen, 128))
|
|
return array
|
|
return array
|