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

cirello-io/HumorChecker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HumorChecker - port of SentiMental into Go.

Go

Credits where credits are due: consider starring SentiMental repo on which this one was based.

Sentiment analysis tool based on the AFINN-111 wordlist.

Install

$ go get cirello.io/HumorChecker

Features

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

Example

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"))
}