Metadata-Version: 2.1
Name: cn-sentiment-measures
Version: 1.0.0.dev5
Summary: A toolkit for estimating Chinese sentiment scores with multiple measures.
Home-page: https://github.com/dhchenx/cn-sentiment-measures
Author: Donghua Chen
Author-email: douglaschan@126.com
License: UNKNOWN
Project-URL: Bug Reports, https://github.com/dhchenx/cn-sentiment-measures/issues
Project-URL: Say Thanks!, https://github.com/aishoot/cn-sentiment-measures
Project-URL: Source, https://github.com/dhchenx/cn-sentiment-measures/tree/main/src/cn_sentiment_measures
Keywords: sentiment analysis,Chinese,measures,text analysis,natural language processing
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Build Tools
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.6, <4
Description-Content-Type: text/markdown
Provides-Extra: dev
Provides-Extra: test
License-File: LICENSE.txt

# Chinese Sentiment Measures 

A toolkit for estimating Chinese sentiment scores with multiple measures. 

```pip
pip install cn-sentiment-measures
```

## Measures
1. Absolute Proportional Difference - APD. Bounds: [-1, 1]
2. Relative Proportional Difference - RPD. Bounds: [-1, 1]
3. 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
```python

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](https://github.com/dhchenx). 



