luojiehua 3 vuotta sitten
vanhempi
commit
9b6b081b4a

+ 1 - 1
iepy/selfpreprocess/BiddingKG/dl/entityLink/entityLink.py

@@ -63,7 +63,7 @@ DICT_ENTERPRISE = {}
 DICT_ENTERPRISE_DONE = False
 def getDict_enterprise():
     global DICT_ENTERPRISE,DICT_ENTERPRISE_DONE
-    filename = "../LEGAL_ENTERPRISE.txt"
+    filename = os.path.dirname(__file__)+"/../LEGAL_ENTERPRISE.txt"
     filepath = os.path.dirname(__file__)+"/../"
     real_path = filename
     if os.path.exists(os.path.join(filepath,filename)):

+ 1 - 1
iepy/selfpreprocess/test4.py

@@ -37,7 +37,7 @@ tf.nn.ctc_loss
 if __name__=="__main__":
     # filename = "比地_52_79929693.html"
     #text = codecs.open("C:\\Users\\User\\Desktop\\数据20191014\\"+filename,"r",encoding="utf8").read()
-    text = codecs.open("C:\\Users\\User\\Desktop\\2.html","r",encoding="utf8").read()
+    text = codecs.open("C:\\Users\\\Administrator\\Desktop\\2.html","r",encoding="utf8").read()
     content = str(BeautifulSoup(text).find("div",id="pcontent"))
     # df_a = {"html":[]}
     # df_a["html"].append(re.sub('\r|\n|\r\n',"",content))