Skip to content
This repository has been archived by the owner on May 17, 2024. It is now read-only.

Commit

Permalink
Port to Go of Sentimental library (thinkroth/Sentimental)
Browse files Browse the repository at this point in the history
  • Loading branch information
ucirello committed Dec 19, 2015
1 parent 62125d8 commit bd48917
Show file tree
Hide file tree
Showing 5 changed files with 2,703 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
language: go
sudo: false

go:
- 1.5
36 changes: 34 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,34 @@
# HumorChecker
Port into Go of Sentimental library
# HumorChecker - port of SentiMental into Go.

[![Build Status](https://travis-ci.org/ccirello/HumorChecker.svg?branch=master)](https://travis-ci.org/ccirello/HumorChecker)

Credits where credits are due: consider starring [SentiMental](https://github.com/thinkroth/Sentimental) repo on which this one was based.

Sentiment analysis tool based on the [AFINN-111 wordlist](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6010).

## Install
$ go get cirello.io/HumorChecker

## Features

* Positivity ranking
* Negativity ranking
* Analyze - combines Positivity and Negativity ranking into an aggregate sentiment score

## Example
```js
package main

import hc "cirello.io/HumorChecker"

func main(){
hc.Analyze("Hey you worthless scumbag"); //Score: -6, Comparative:-1.5
hc.Positivity("This is so cool"); //Score: 1, Comparative:.25
hc.Negativity("Hey you worthless scumbag"); //Score: 6, Comparative:1.5
hc.Analyze("I am happy"); //Score: 3, Comparative: 1
hc.Analyze("I am so happy"); //Score: 6, Comparative: 1.5
hc.Analyze("I am extremely happy"); //Score: 12, Comparative: 3
hc.Analyze("I am really sad"); //Score: -4, Comparative: -1
}
```

Loading

0 comments on commit bd48917

Please sign in to comment.