Share via


DetectLanguageResult Class

public final class DetectLanguageResult
extends TextAnalyticsResult

The DetectLanguageResult model.

Constructor Summary

Constructor Description
DetectLanguageResult(String id, TextDocumentStatistics textDocumentStatistics, TextAnalyticsError error, DetectedLanguage primaryLanguage)

Creates a DetectLanguageResult model that describes detected languages result.

Method Summary

Modifier and Type Method and Description
DetectedLanguage getPrimaryLanguage()

Gets the detected primary language.

Methods inherited from TextAnalyticsResult

Methods inherited from java.lang.Object

Constructor Details

DetectLanguageResult

public DetectLanguageResult(String id, TextDocumentStatistics textDocumentStatistics, TextAnalyticsError error, DetectedLanguage primaryLanguage)

Creates a DetectLanguageResult model 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

public DetectedLanguage getPrimaryLanguage()

Gets the detected primary language.

Returns:

The detected language.

Applies to