sentiment

package
v0.0.0-...-795d1ad Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnalyzeRequest

type AnalyzeRequest struct {
	// The language. Defaults to english.
	Lang string `json:"lang"`
	// The text to analyze
	Text string `json:"text"`
}

type AnalyzeResponse

type AnalyzeResponse struct {
	// The score of the text {positive is 1, negative is 0}
	Score float64 `json:"score"`
}

type SentimentService

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

func NewSentimentService

func NewSentimentService(token string) *SentimentService

func (*SentimentService) Analyze

func (t *SentimentService) Analyze(request *AnalyzeRequest) (*AnalyzeResponse, error)

Analyze and score a piece of text

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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