sentiment

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package sentiment provides sentiment analysis for content

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analyzer

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

Analyzer analyzes sentiment of text

func NewAnalyzer

func NewAnalyzer() *Analyzer

NewAnalyzer creates a new sentiment analyzer

func (*Analyzer) Analyze

func (a *Analyzer) Analyze(text string) *Result

Analyze analyzes text sentiment

type Result

type Result struct {
	Score         float64
	Sentiment     string
	PositiveCount int
	NegativeCount int
	Confidence    float64
}

Result represents sentiment analysis result

Jump to

Keyboard shortcuts

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