Skip to main content

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.

Release files for sentiment-lexicon 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sentiment-lexicon 0.2.3
File Size Uploaded
sentiment_lexicon-0.2.3.tar.gz 4.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sentiment-lexicon 0.2.3
File Interpreter ABI Platform
sentiment_lexicon-0.2.3-py3-none-any.whl Python 3 none any Details

Total release size: 10.0 kB

Release files / sentiment_lexicon-0.2.3.tar.gz

Download URL sentiment_lexicon-0.2.3.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
4ff7060827366a189b668f7930cf273a1b5219c817e2a4fc5f5d1de9edd8b0ac
BLAKE2b-256 checksum
How to use checksums
013e394dba8bbdf195d0833c60084475c397247b39b83931c407d98de2340fbc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

Release files / sentiment_lexicon-0.2.3-py3-none-any.whl

Download URL sentiment_lexicon-0.2.3-py3-none-any.whl
Size 5.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0c78ae022b51e28771a447fb553c7471bd08d5443e54299cc7a275d5281cab44
BLAKE2b-256 checksum
How to use checksums
bc52627d34807ef78cec7db76fa1a44d723716dce84c84c9b67b3a688c543d68
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

Release history Release notifications | RSS feed

This release

0.2.3 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page