Click or drag to resize
SentimentAnalysisServiceAnalyzeText Method
Analyzes the sentiment of given text.

Namespace: CMS.TextAnalytics.Azure
Assembly: CMS.TextAnalytics.Azure (in CMS.TextAnalytics.Azure.dll) Version: 13.0.131
Syntax
C#
public DocumentSentiment AnalyzeText(
	string text,
	string cultureCode,
	string siteName
)

Parameters

text
Type: SystemString
Text to analyze.
cultureCode
Type: SystemString
Culture of the provided text. If unspecified, this value will be set to the default language ('en') in the request sent to the service. If set to an empty string, the service will apply a model where the language is explicitly set to "None".
siteName
Type: SystemString
Site whose Sentiment Analysis API configuration to use.

Return Value

Type: DocumentSentiment
Returns the sentiment analysis result.

Implements

ISentimentAnalysisServiceAnalyzeText(String, String, String)
Exceptions
ExceptionCondition
ArgumentNullExceptionThrown when text is null.
ArgumentExceptionThrown when cultureCode is not supported by Azure Sentiment Analysis service.
InvalidOperationExceptionThrown when the API endpoint or key are not configured for the siteName.
RequestFailedExceptionThrown when Azure service returned a non-success status code.
See Also