python-3.x - 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 文件夹的站点包中看到它为什么我不能导入它?
解决方案
推荐阅读
- regex - 在 Google 表格中使用正则表达式更正聚合公式,以便考虑所有实例
- r - 安装 factoextra 时 rbind(info, getNamespaceInfo(env, "S3methods")) 出错
- c++ - 如何使用struct在二维数组中移动玩家对象
- node.js - 正则表达式匹配除两个特定字符串之外的任何内容(angular/cli 7.3.5,types/node 8.9.4)
- javascript - 如何将每种颜色应用于每个数据集
- corda - 如何在corda中将不是金钱的资产从一方转移到另一方
- javascript - 当我添加绝对位置时,UL 背景不显示
- arrays - 尝试区分“...”时出错。只允许使用数组和可迭代对象。(使用 switchMap)
- csv - Hive 可以处理 CSV 文件中的多个双引号吗?
- html - 如何将sql查询结果转换为带有属性的html标签