Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/luisgustavoneves/happy
https://github.com/luisgustavoneves/happy
Last synced: 14 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/luisgustavoneves/happy
- Owner: luisgustavoneves
- License: mit
- Created: 2014-06-29T03:05:27.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-07-12T02:15:01.000Z (over 10 years ago)
- Last Synced: 2024-08-01T05:19:24.353Z (3 months ago)
- Language: JavaScript
- Size: 611 KB
- Stars: 73
- Watchers: 6
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-projects - happy - (JavaScript)
README
happy
=====Happiness meter for python. A sentiment analysis tool based on papers:
http://www.uvm.edu/storylab/share/papers/dodds2014a/index.html
http://www.uvm.edu/~cdanfort/research/dodds-danforth-johs-2009.pdf
Setup
-----First download files for target language:
http://www.uvm.edu/storylab/share/papers/dodds2014a/data.html
Then configure your language at the beginning of the code:
```python
LANG = "target_language"
```Usage
-----```python
import happy as h
# shows text overall happiness index. Scale 1 (sad) to 9 (happy). Lower and upper limits for word filtering are optional,
# default is 3 and 7 (only words with score bellow 3 or over 7 are considered).
print h.hi(text, 4, 6)
# make an html page with point and click happiness graph with specified window. Lower and upper limits also configurable,
# window, lower and upper are optional.
h.hgraph('title', text, window, l, u)
```Requirements
------------- python 2.7
- flot (for happiness graph) already included in source.