Class DetectLanguageResult
java.lang.Object
com.azure.ai.textanalytics.models.TextAnalyticsResult
com.azure.ai.textanalytics.models.DetectLanguageResult
The
DetectLanguageResult model.-
Constructor Summary
ConstructorsConstructorDescriptionDetectLanguageResult(String id, TextDocumentStatistics textDocumentStatistics, TextAnalyticsError error, DetectedLanguage primaryLanguage) Creates aDetectLanguageResultmodel that describes detected languages result. -
Method Summary
Modifier and TypeMethodDescriptionGets the detected primary language.Methods inherited from class com.azure.ai.textanalytics.models.TextAnalyticsResult
getError, getId, getStatistics, isError
-
Constructor Details
-
DetectLanguageResult
public DetectLanguageResult(String id, TextDocumentStatistics textDocumentStatistics, TextAnalyticsError error, DetectedLanguage primaryLanguage) Creates aDetectLanguageResultmodel that describes detected languages result.- Parameters:
id- Unique, non-empty document identifier.textDocumentStatistics- The text document statistics.error- The document error.primaryLanguage- The detected primary language.
-
-
Method Details
-
getPrimaryLanguage
Gets the detected primary language.- Returns:
- The detected language.
- Throws:
TextAnalyticsException- if result hasisErrorequals to true and when a non-error property was accessed.
-