sentiment

package
v0.0.0-...-524d49d Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	POSITIVE = "positive"
	NEGATIVE = "negative"
	NEUTRAL  = "neutral"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Sentiment

type Sentiment struct {
	SentimentServiceHost string
	LanguageDetector     lingua.LanguageDetector
	Client               *http.Client
}

func NewSentiment

func NewSentiment(sentimentServiceHost string) *Sentiment

func (*Sentiment) GetPostsSentiment

func (s *Sentiment) GetPostsSentiment(ctx context.Context, posts []*SentimentPost) ([]*SentimentPost, error)

type SentimentPost

type SentimentPost struct {
	ActorDID string             `json:"actor_did"`
	Rkey     string             `json:"rkey"`
	Text     string             `json:"text"`
	Decision *sentimentDecision `json:"decision"`
	Langs    []string           `json:"langs"`
}

Jump to

Keyboard shortcuts

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