Showing
1 changed file
with
1 additions
and
3 deletions
| @@ -4,7 +4,7 @@ import re | @@ -4,7 +4,7 @@ import re | ||
| 4 | def main(): | 4 | def main(): |
| 5 | reader = open('./cutComments.txt','r',encoding='utf8') | 5 | reader = open('./cutComments.txt','r',encoding='utf8') |
| 6 | strs = reader.read() | 6 | strs = reader.read() |
| 7 | - result = open('cipingTotal.csv', 'w', encoding='utf8') | 7 | + result = open('./utils/cipingTotal.csv', 'w', encoding='utf8') |
| 8 | 8 | ||
| 9 | # 分词,去重,列表 | 9 | # 分词,去重,列表 |
| 10 | word_list = jieba.cut(strs,cut_all=True) | 10 | word_list = jieba.cut(strs,cut_all=True) |
| @@ -28,5 +28,3 @@ def main(): | @@ -28,5 +28,3 @@ def main(): | ||
| 28 | for i in range(100): | 28 | for i in range(100): |
| 29 | print(list_count[i],file=result) | 29 | print(list_count[i],file=result) |
| 30 | 30 | ||
| 31 | -if __name__ == '__main__': | ||
| 32 | - print(main()) |
-
Please register or login to post a comment