wsssentiment

package
v0.0.0-...-4020383 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//TextAnalyticsSubscriptionKey Azure TextAnalytics Subscription env key
	TextAnalyticsSubscriptionKey = "WSS_TEXTANALYTICS_SUBSCRIPTION_KEY"
	//TextAnalyticsEndpointKey Azure TextAnalytics Endpoint env key
	TextAnalyticsEndpointKey = "WSS_TEXTANALYTICS_ENDPOINT"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	TextAnalyticsSubscription string
	ServiceEnpoint            string
}

Configuration structure for the TextAnalytics service configuration

func BuildConfigurationFromEnvs

func BuildConfigurationFromEnvs() (*Configuration, error)

BuildConfigurationFromEnvs builds the configuration from env variables

func (*Configuration) IsValid

func (c *Configuration) IsValid() bool

IsValid Checks if the configuration is valid

type TextAnalyticsResult

type TextAnalyticsResult struct {
	SentimentScore *float64
}

TextAnalyticsResult result of the TextAnalyticsAPI

type TextAnalyticsServiceClient

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

TextAnalyticsServiceClient client for the Azure TextAnalytics Service

func NewTextAnalyticsServiceClient

func NewTextAnalyticsServiceClient(conf *Configuration) *TextAnalyticsServiceClient

NewTextAnalyticsServiceClient TextAnalyticsServiceClient constructor

func (*TextAnalyticsServiceClient) InvokeTextAnalytics

func (s *TextAnalyticsServiceClient) InvokeTextAnalytics(textAnalyticsContext context.Context, message string) (*TextAnalyticsResult, error)

InvokeTextAnalytics invokes the TextAnalytics APIs with the provided photo

Jump to

Keyboard shortcuts

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