DetectLanguage procedure

Official Content
This documentation is valid for:

Determines the language of a written text.

Parameters

x

Configuration

The following table resumes the configuration properties (access credentials) you must set in order to use this AI task.

Property Amazon WS Baidu AI Google Cloud AI IBM Watson Microsoft Azure SAP Leonardo Tencent AI
Id - 通用翻译 - - - - 语种识别
Key Comprehend 通用翻译 Cloud Translation API Language Translator Translator Text Sandbox Environment 语种识别
SecretKey Comprehend 通用翻译 - - - - -

Sample

Taking the following text as input, the table below shows the identified language for each provider (as a JSON structure) and the time it takes for processing it.

"The first question that comes up is: What is GeneXus? GeneXus is a tool that automatically generates software programs such as applications for the Web, and Smart Devices, always at the forefront of technological evolution."

Provider Output Benchmark
Amazon WS
{
    "label": "en",
    "confidence": 0.994
}
1016ms
Baidu AI
{
    "label": "en",
    "confidence": 1.000
}
2460ms
Google Cloud AI
{
    "label": "en",
    "confidence": 1.000
}
817ms
IBM Watson
{
    "label": "en",
    "confidence": 0.999
}
3595ms
Microsoft Azure
{
    "label": "en",
    "confidence": 1.000
}
2912ms
SAP Leonardo
{
    "label": "en",
    "confidence": 1.000
}
2355ms
Tencent AI
{
    "label": "en",
    "confidence": 1.000
}
3148ms


And, by taking a language ambiguous source text as follows.

"The first question that comes up is: ¿Qué es GeneXus? GeneXus is a tool that automatically generates software programs como aplicaciones Web, y Smart Devices, always at the forefront of la evolución tecnlológica."

Provider

Output

Benchmark
Amazon WS
{
    "label": "en",
    "confidence": 0.807
}
1049ms
Baidu AI
{
    "label": "spa",
    "confidence": 1
}
2747ms
Google Cloud AI
{
    "label": "en",
    "confidence": 0.855
}
703ms
IBM Watson
{
    "label": "es",
    "confidence": 0.797
}
3595ms
Microsoft Azure
{
    "label": "en",
    "confidence": 1.000
}
2912ms
SAP Leonardo
{
    "label": "en",
    "confidence": 0.999
}
2989ms
Tencent AI
{
    "label": "en",
    "confidence": 1.000
}
2293ms

Notes

  • The label assigned will be a two-letter code according to the ISO 639-1.

Scope

Platforms Web(.NET,.NETCore,Java), SmartDevices(Android,iOS)
Connectivity Online

Availability

This procedure is available as of GeneXus 16.

Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.