< Summary

Class:Azure.AI.TextAnalytics.DetectedLanguage
Assembly:Azure.AI.TextAnalytics
File(s):C:\Git\azure-sdk-for-net\sdk\textanalytics\Azure.AI.TextAnalytics\src\DetectedLanguage.cs
Covered lines:8
Uncovered lines:1
Coverable lines:9
Total lines:46
Line coverage:88.8% (8 of 9)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-100%100%
get_Name()-100%100%
get_Iso6391Name()-100%100%
get_ConfidenceScore()-100%100%
get_Warnings()-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\textanalytics\Azure.AI.TextAnalytics\src\DetectedLanguage.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using System.Collections.Generic;
 5using System.Collections.ObjectModel;
 6using Azure.AI.TextAnalytics.Models;
 7
 8namespace Azure.AI.TextAnalytics
 9{
 10    /// <summary>
 11    /// A prediction of the language in which a document is written in.
 12    /// </summary>
 13    public readonly struct DetectedLanguage
 14    {
 15        internal DetectedLanguage(DetectedLanguage_internal language, IList<TextAnalyticsWarning> warnings)
 16        {
 8417            Name = language.Name;
 8418            Iso6391Name = language.Iso6391Name;
 8419            ConfidenceScore = language.ConfidenceScore;
 8420            Warnings = new ReadOnlyCollection<TextAnalyticsWarning>(warnings);
 8421        }
 22
 23        /// <summary>
 24        /// Gets the spelled-out name of the detected language (for example,
 25        /// "English" or "French").
 26        /// </summary>
 6827        public string Name { get; }
 28
 29        /// <summary>
 30        /// Gets a two letter representation of the detected language
 31        /// according to the ISO 639-1 standard (for example, "en" or "fr").
 32        /// </summary>
 1633        public string Iso6391Name { get; }
 34
 35        /// <summary>
 36        /// Gets a confidence score between 0 and 1. Scores close to 1
 37        /// indicate high certainty that the identified language is correct.
 38        /// </summary>
 1639        public double ConfidenceScore { get; }
 40
 41        /// <summary>
 42        /// Gets the warnings encountered while processing the document.
 43        /// </summary>
 044        public IReadOnlyCollection<TextAnalyticsWarning> Warnings { get; }
 45    }
 46}