Class DetectLanguageResult

    • Constructor Detail

      • 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 Detail

      • getPrimaryLanguage

        public DetectedLanguage getPrimaryLanguage()
        Gets the detected primary language.
        Returns:
        The detected language.
        Throws:
        TextAnalyticsException - if result has isError equals to true and when a non-error property was accessed.