Azalea (on HyDEV-Daisy) 5ac3c8cea0 [F] Fix scale
2022-04-14 20:56:28 -04:00
2022-04-14 20:56:28 -04:00
2022-04-14 20:24:38 -04:00
2022-04-14 20:46:29 -04:00
2022-04-14 20:49:35 -04:00
2022-04-14 20:45:56 -04:00
2022-04-14 20:45:56 -04:00
2022-04-14 20:49:35 -04:00

Python-SentiStrength

Python 3 Wrapper for SentiStrength.

Note: This package has the SentiStrength JAR file built in to simplify access. However, the original author did not release the JAR free for commercial use. If you are using this for commercial purposes, please email the original author Dr. Mike Thelwall to buy the commercial license. More details about licensing at (http://sentistrength.wlv.ac.uk/).

Installation

You have to install python >= 3.7 and java JRE >= 1.8.0 first. Then, install this library with pip.

pip install pysenti

Examples

Single string example:

import pysenti

s = pysenti.get_senti('What a lovely day')
# SentiResult(positive=2, negative=-1, neutral=1)

s.scale()
# 1
s.is_positive()
# True

Multiple strings example:

If you have a list of strings, please use this function and don't call get_senti in a loop. This is because this function only opens one subprocess to process all strings in the list, whereas get_senti opens a new subprocess every time.

import pysenti

pysenti.get_senti_list(['What a lovely day', 'I love cats'])

Acknowledgments

  • Big thanks to Dr. Mike Thelwall for access to SentiStrength.
S
Description
Better Python 3 wrapper for SentiStrength. SentiStrength is capable of automatic sentiment analysis of up to 16,000 social web texts per second with up to human level accuracy for English.
Readme 5.7 MiB
Languages
Python 94.4%
Shell 5.6%