Class Detection (3.1.0)

public sealed class Detection

A result of detecting the language of a piece of text via DetectLanguage(String) or DetectLanguageAsync(String, CancellationToken), or the multiple-item equivalents.

Inheritance

Object > Detection

Namespace

Google.Cloud.Translation.V2

Assembly

Google.Cloud.Translation.V2.dll

Constructors

Detection(String, String, Single, Boolean)

public Detection(string text, string language, float confidence, bool isReliable)

Constructs a new instance.

Parameters
NameDescription
textString

The text that was used for the input of language detection.

languageString

The detected language code.

confidenceSingle

The confidence of the detection.

isReliableBoolean

The reliability of the detection.

Properties

Confidence

public float Confidence { get; }

The confidence level (between 0 and 1) of the detection.

Property Value
TypeDescription
Single

IsReliable

public bool IsReliable { get; }

The reliability of the detection.

Property Value
TypeDescription
Boolean

Language

public string Language { get; }

The language code for the detected language.

Property Value
TypeDescription
String

Text

public string Text { get; }

The text that was used for the input of language detection.

Property Value
TypeDescription
String