Home > other >  With the open, when the readlines read TXT data, can only read a small part
With the open, when the readlines read TXT data, can only read a small part

Time:11-19

The code is as follows:
 print (" textrank algorithm to extract the keywords is as follows: ") 
With the open (filepath, encoding="utf-8") as f:
Data=(https://bbs.csdn.net/topics/f.read)
# print (data)
The for keyword, weight in textrank (data, topK=10, withWeight=True) :
Print (' % s' % (keyword))



TXT data about 100000 Chinese characters, can only read about 12000 or so now all will be over: is there any way to read it?
  • Related