emoji

package module
v0.0.0-...-0f48ea8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2019 License: MIT Imports: 2 Imported by: 0

README

emoji

godoc goreportcard

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetScore

func GetScore(input string) int

GetScore - Return a sentiment score from a given string.

Types

type Emoji

type Emoji struct {
	// contains filtered or unexported fields
}

Emoji - An emoji with emotion type, sentiment score and bytes.

func GetEmoji

func GetEmoji(emotion Emotion, score int) *Emoji

GetEmoji - Get an emoji based on emotion and sentiment score.

func GetRandomEmoji

func GetRandomEmoji(emotion Emotion) *Emoji

GetRandomEmoji - Get a random emoji based on emotion.

func (*Emoji) Bytes

func (e *Emoji) Bytes() []byte

Bytes - Return the byte representation of this emoji.

func (*Emoji) Emotion

func (e *Emoji) Emotion() Emotion

Emotion - Return the emotion of this emoji.

func (*Emoji) Score

func (e *Emoji) Score() int

Score - Return the sentiment score of this emoji.

func (*Emoji) String

func (e *Emoji) String() string

GetString - Return a string representation of this emoji.

type Emotion

type Emotion string

Emotion - An emotion in string value.

const (
	Happy   Emotion = "happy"
	Neutral Emotion = "neutral"
	Sad     Emotion = "sad"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL