jieba分词(添加分词词典)
为了分词效果更好,可以自己建立分词词典加入到jieba词典中:jieba.load_userdict()()内为分词词典路径+名称。写一个分词的小函数:import jiebadef preprocess(path): text = "" fenci = open(path, "r", encoding="utf-8").read() jieba.lo...