This release is a pre-release and may not be stable for production use.
Chinese Sentiment Measures
A toolkit for estimating Chinese sentiment scores with multiple measures.
pip install cn-sentiment-measures
Measures
- Absolute Proportional Difference - APD. Bounds: [-1, 1]
- Relative Proportional Difference - RPD. Bounds: [-1, 1]
- Logit scale - LC. Bounds: [-infinity, +infinity]
Improved versions of the above measures by integrating degree words are marked with _with_degree in the toolkit.
Examples
from cn_sentiment_measures.sentiment_measures import SentimentMeasures
sm = SentimentMeasures()
word_list=["我","今天","很","高兴"]
print("Here are measure values with normal measures!")
print('APD = ',sm.APD(word_list))
print('RPD = ',sm.RPD(word_list))
print('LS = ',sm.LS(word_list))
print()
print("Here are measure values optimized by using adverb words!")
print('APD* = ',sm.APD_with_degree(word_list))
print('RPD* = ',sm.RPD_with_degree(word_list))
print('LS* = ',sm.LS_with_degree(word_list))
License
The project is provided by Donghua Chen.
Metadata
Release files for cn-sentiment-measures 1.0.0.dev5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cn-sentiment-measures-1.0.0.dev5.tar.gz | 198.5 kB | Without provenance | Details for cn-sentiment-measures-1.0.0.dev5.tar.gz |
Release files / cn-sentiment-measures-1.0.0.dev5.tar.gz
| Download URL | cn-sentiment-measures-1.0.0.dev5.tar.gz |
|---|---|
| Size | 198.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
79a00e74269cb0a9c44952b3daeb964a35787c2dab50acde38233f1f548c7eb4
|
|
BLAKE2b-256 checksum How to use checksums |
1aebbc1c17226122a20c5bfc1253f5f7ddfe877be70c1a305b6261836d0beb2b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.21.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.6
|
Security for cn-sentiment-measures 1.0.0.dev5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.