Jeffmxh_sentiment_analyse.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:emotion_analyse_py 作者: jeffmxh 项目源码 文件源码
def __init__(self,n_core = 16):
        self.rootdir = os.getcwd()
        self.STOP_WORDS_LIST = self.load_txt(path.join(self.rootdir, 'resources', 'stopwords_utf8.txt'))
        self.STOP_WORDS_LIST = set([re.sub('\n', '', item) for item in self.STOP_WORDS_LIST])
        jieba.load_userdict(path.join(self.rootdir, 'resources', 'emotion_user_dict.txt'))
        self.n_CORE=n_core
        jieba.enable_parallel(self.n_CORE-1)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号