同义词替换,停词去除
# -*- coding: utf-8 -*-# 去重:①同义词去重,停顿词去掉 ②删除特殊符号 ③ 删除重复import refrom typing import Iterableimport timeimport jiebajieba.initialize()jieba.load_userdict('./stopword.txt')tongyici = { '梦见': ['梦到', '做梦'], '怎么': ['怎么样', '如何'], '男孩': ['男.