首页 > 解决方案 > ModuleNotFoundError:没有名为“bulstem”的模块

问题描述

from bulstem.stem import BulStemmer

PRE_DEFINED_RULES = ['stem-context-1', 
                     'stem-context-2',
                     'stem-context-3']
for i, rules_name in enumerate(PRE_DEFINED_RULES, start=1):
    stemmer = BulStemmer.from_file(rules_name, min_freq=2, left_context=i)
    print(i, stemmer.stem('вторият'))

stemmer = BulStemmer.from_file('stem_rules_context_2_utf8.txt', min_freq=2, left_context=i)
stemmer.stem('вторият') 
stemmer.stem('вероятен') 

它给了我

文件“D:\data\bulstem test.py”,第 8 行,从 bulstem.stem 导入 BulStemmer

ModuleNotFoundError:没有名为“bulstem”的模块

我已经用 pip install bulstem 安装了它,我在 python 文件夹的站点包中看到它为什么我不能导入它?

标签: python-3.x

解决方案


推荐阅读