Skip to main content

No project description provided

Project description

Sentiment lexicon wrapper and generator.


pip install sentiment-lexicon


The module provides a single class, Lexicon, that can be used as a simple wrapper around sentiment lexicon data. The sentiment value of a given word can be accessed via the value instance method.

from sentiment_lexicon import Lexicon

lexicon = Lexicon(words, values)

lexicon.value('good') # => 1

The class can also generate a sentiment lexicon based on positive and negative input documents.

lexicon = Lexicon.from_labelled_text(positive_documents, negative_documents)

More information is available in the documentation.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for sentiment-lexicon, version 0.2.3
Filename, size File type Python version Upload date Hashes
Filename, size sentiment_lexicon-0.2.3-py3-none-any.whl (5.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size sentiment_lexicon-0.2.3.tar.gz (4.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page