mirror of
https://github.com/RYDE-WORK/MediaCrawler.git
synced 2026-01-19 21:43:32 +08:00
Merge branch 'main' into feature/baidu_tieba_20240805
This commit is contained in:
commit
62ac454639
@ -27,7 +27,7 @@ class AsyncWordCloudGenerator:
|
||||
|
||||
async def generate_word_frequency_and_cloud(self, data, save_words_prefix):
|
||||
all_text = ' '.join(item['content'] for item in data)
|
||||
words = [word for word in jieba.lcut(all_text) if word not in self.stop_words]
|
||||
words = [word for word in jieba.lcut(all_text) if word not in self.stop_words and len(word.strip()) > 0]
|
||||
word_freq = Counter(words)
|
||||
|
||||
# Save word frequency to file
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user