sentiment

package
v0.0.0-...-d078efc Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LabelPositive labels a sentiment score as positive.
	LabelPositive = Label("POSITIVE")

	// LabelNegative labels a sentiment score as negative.
	LabelNegative = Label("NEGATIVE")

	// LabelNeutral labels a sentiment score as neutral.
	LabelNeutral = Label("NEUTRAL")

	// LabelUnknown labels a sentiment score as unknown.
	LabelUnknown = Label("UNKNOWN")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DetectOutput

type DetectOutput struct {
	Score Score
	Label Label
}

DetectOutput is the type of Detector.Detect method.

type Detector

type Detector interface {
	BatchDetect(ctx context.Context, textList []*string) ([]DetectOutput, error)
}

Detector provides sentiment detections.

type Label

type Label string

Label represents a label type of sentiment scores.

type Score

type Score struct {
	Positive *float64
	Negative *float64
	Neutral  *float64
}

Score is the sentiment score of text.

Jump to

Keyboard shortcuts

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