public sealed class DetectionReference 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 |
stringThe text that was used for the input of language detection. |
language |
stringThe detected language code. |
confidence |
floatThe confidence of the detection. |
isReliable |
boolThe 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 |
|