Credits where credits are due: consider starring SentiMental repo on which this one was based.
Sentiment analysis tool based on the AFINN-111 wordlist.
$ go get cirello.io/HumorChecker
- Positivity ranking
- Negativity ranking
- Analyze - combines Positivity and Negativity ranking into an aggregate sentiment score
package main
import (
"fmt"
hc "cirello.io/HumorChecker"
)
func main() {
fmt.Printf("%#v\n", hc.Analyze("Hey you worthless scumbag"))
fmt.Printf("%#v\n", hc.Positivity("This is so cool"))
fmt.Printf("%#v\n", hc.Negativity("Hey you worthless scumbag"))
fmt.Printf("%#v\n", hc.Analyze("I am happy"))
fmt.Printf("%#v\n", hc.Analyze("I am so happy"))
fmt.Printf("%#v\n", hc.Analyze("I am extremely happy"))
fmt.Printf("%#v\n", hc.Analyze("I am really sad"))
}