sentimentanalyzer

package
v0.0.0-...-8a4ab9d Latest Latest
Warning

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

Go to latest
Published: May 26, 2022 License: MIT Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analysis

type Analysis struct {
	Sentiment        Sentiment
	Confidence       float32
	SentenceAnalyses []SentenceAnalysis
}

Analysis represents the sentiment analysis.

func GetSentiment

func GetSentiment(svc sentimentAnalyzer, comment string) (Analysis, error)

GetSentiment calls a sentimentService and retrieves the corresponding analysis.

func (Analysis) NegativeSentences

func (a Analysis) NegativeSentences() []SentenceAnalysis

NegativeSentences returns any negative sentences.

type SentenceAnalysis

type SentenceAnalysis struct {
	Sentiment  Sentiment
	Confidence float32
	Text       string
}

SentenceAnalysis represents individual sentence analysis.

type Sentiment

type Sentiment int

Sentiment is the type representation of a sentiment.

const (
	Positive Sentiment = iota
	Negative
	Neutral
)

func (Sentiment) String

func (i Sentiment) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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