简体   繁体   English

没有名为sendiwordnet的模块错误python

[英]No module named sentiwordnet error python

I am trying to get sentiwordnet scores for a project in python and I find this code somewhere. 我正在尝试为python中的项目获取sendiwordnet分数,并且在某处找到了此代码。

    import sentiwordnet
    from sentiwordnet import *
    swn_filename = 'C:\\Python27\\Lib\\SentiWordNet_3.0.0_20130122.txt'
    swn = SentiWordNetCorpusReader(swn_filename)

and so on... However, when I run it throws error "no module named sentiwordnet". 依此类推...但是,当我运行它时,会引发错误“没有名为sentiwordnet的模块”。 I tried to pip install sentiwordnet thinking the module might be missing but that also threw an error. 我试图通过点点安装sendiwordnet来认为该模块可能丢失,但这也引发了错误。 What to do?? 该怎么办?? Pls help. 请帮助。

Check out the installation guide here: http://www.nltk.org/install.html 在此处查看安装指南: http : //www.nltk.org/install.html

The class you want to use is documented here: http://www.nltk.org/api/nltk.corpus.reader.html#module-nltk.corpus.reader.sentiwordnet 您要使用的类记录在这里: http : //www.nltk.org/api/nltk.corpus.reader.html#module-nltk.corpus.reader.sentiwordnet

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM