Google Cloud Translation v2 API - Class Detection (3.2.0)

public sealed class Detection

Reference documentation and code samples for the Google Cloud Translation v2 API 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

GoogleGoogle.CloudGoogle.Cloud.TranslationV2

Assembly

Google.Cloud.Translation.V2.dll

Constructors

Detection(string, string, float, bool)

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.

confidencefloat

The confidence of the detection.

isReliablebool

The reliability of the detection.

Properties

Confidence

public float Confidence { get; }

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

Property Value
TypeDescription
float

IsReliable

public bool IsReliable { get; }

The reliability of the detection.

Property Value
TypeDescription
bool

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