public sealed class DetectionA 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, Single, Boolean)
public Detection(string text, string language, float confidence, bool isReliable)Constructs a new instance.
| Parameters | |
|---|---|
| Name | Description |
text |
StringThe text that was used for the input of language detection. |
language |
StringThe detected language code. |
confidence |
SingleThe confidence of the detection. |
isReliable |
BooleanThe reliability of the detection. |
Properties
Confidence
public float Confidence { get; }The confidence level (between 0 and 1) of the detection.
| Property Value | |
|---|---|
| Type | Description |
Single |
|
IsReliable
public bool IsReliable { get; }The reliability of the detection.
| Property Value | |
|---|---|
| Type | Description |
Boolean |
|
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 |
|