fix/force to assign utf-8
This commit is contained in:
parent
70c3705319
commit
a5f10aaca1
1 changed files with 2 additions and 1 deletions
|
@ -78,7 +78,8 @@ def analysis():
|
|||
wordlist = jieba.lcut(toots_content)
|
||||
space_list = ' '.join(wordlist)
|
||||
stopwords = set()
|
||||
content = [line.strip() for line in open('misc/stopwords.txt','r').readlines()]
|
||||
content = [line.strip() for line in open('misc/stopwords.txt','r',
|
||||
encoding='utf-8').readlines()]
|
||||
stopwords.update(content)
|
||||
|
||||
wc = WordCloud(width=1400, height=2200,
|
||||
|
|
Loading…
Reference in a new issue