python 使用 jieba 进行中文分词

创建日期: 2025-01-13 14:11 | 作者: 风波 | 浏览次数: 18 | 分类: Python

来源:https://developer.baidu.com/article/details/3345997

import jieba
text = "MongoDB实战:高效实现中文全文搜索"
words = list(jieba.cut(text))
# 假设这是存入MongoDB的字段
processed_text = " ".join(words)

代码:https://github.com/fxsjy/jieba

18 浏览
12 爬虫
0 评论