https://github.com/pachacamac/stimmung
Sentiment analysis for the German language
https://github.com/pachacamac/stimmung
Last synced: 6 months ago
JSON representation
Sentiment analysis for the German language
- Host: GitHub
- URL: https://github.com/pachacamac/stimmung
- Owner: pachacamac
- Created: 2015-06-30T01:27:58.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-04-24T23:28:22.000Z (over 9 years ago)
- Last Synced: 2025-05-08T15:44:05.306Z (6 months ago)
- Language: Ruby
- Size: 93.8 KB
- Stars: 20
- Watchers: 3
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- nlp-with-ruby - stimmung - (High Level Tasks / Sentiment Analysis)
README
# Stimmung
Simple sentiment analysis for the German language
[](http://badge.fury.io/rb/stimmung) 
## Usage
```ruby
# use this to init with the default dictionaries
stimmung = Stimmung.new
# or this to init with your dictionaries
stimmung = Stimmung.new('my_dict1.txt', 'my_dict2.txt', '...')
# you can always load additional dictionaries later on with
stimmung.load_dictionary('my_dict.txt')
# and to get an analysis you just do
stimmung.score('irgendein toller text')
# => 0.5066
# this score will be between -1 (super negative) and 1 (super positive)
```
## Dictionaries
The German dictionary is based on SentiWS.
SentiWS is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License (http://creativecommons.org/licenses/by-nc-sa/3.0/).
The latest version of SentiWS can be found at http://wortschatz.informatik.uni-leipzig.de/download/
You can use the crude importer script to import new files in case there is a new version. Hey why don't you open an issue or make a pull request when that happens too? It would be appreciated :)
## Installation
gem install stimmung