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.
Namespace
Google.Cloud.Translation.V2Assembly
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 | |
---|---|
Name | Description |
text | string The text that was used for the input of language detection. |
language | string The detected language code. |
confidence | float The confidence of the detection. |
isReliable | bool The reliability of the detection. |
Properties
Confidence
public float Confidence { get; }
The confidence level (between 0 and 1) of the detection.
Property Value | |
---|---|
Type | Description |
float |
IsReliable
public bool IsReliable { get; }
The reliability of the detection.
Property Value | |
---|---|
Type | Description |
bool |
Language
public string Language { get; }
The language code for the detected language.
Property Value | |
---|---|
Type | Description |
string |
Text
public string Text { get; }
The text that was used for the input of language detection.
Property Value | |
---|---|
Type | Description |
string |