代碼如下:
print("textrank演算法提取的關鍵字如下:")
with open(filepath, encoding="utf-8") as f:
data = f.read()
#print(data)
for keyword, weight in textrank(data, topK=10, withWeight=True):
print('%s' % (keyword))TXT資料中大概有10個漢字,現在只能讀大概12000個左右就結束了 有什么方法可以全部讀取出來嗎?
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/224589.html
上一篇:請指教AttributeError: '_hashlib.HASH' object has no attribute 'updata'
