No project description provided
Project description
Sentiment lexicon wrapper and generator.
Installation
pip install sentiment-lexicon
Usage
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for sentiment_lexicon-0.2.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c78ae022b51e28771a447fb553c7471bd08d5443e54299cc7a275d5281cab44 |
|
MD5 | 7c24000ee55d665a2f8e7ccafd31f6e2 |
|
BLAKE2b-256 | bc52627d34807ef78cec7db76fa1a44d723716dce84c84c9b67b3a688c543d68 |