DetectLanguage procedure

Official Content

Determines the language of a written text.

Parameters

x

Configuration

The following table resumes the configuration properties that you must set before calling this AI task.

Property Google Cloud AI IBM Watson Microsoft Azure SAP Leonardo
Key For Cloud Translation API For Language Translator For Translator Text For Sandbox Environment

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
Google Cloud AI
{
    "label": "en",
    "confidence": 1
}
817ms
IBM Watson
{
    "label": "en",
    "confidence": 0.999999984249564
}
3595ms
Microsoft Azure
{
    "label": "en",
    "confidence": 1
}
2912ms
SAP Leonardo
{
    "label": "en",
    "confidence": 1
}
2355ms


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
Google Cloud AI
{
    "label": "en",
    "confidence": 0.855225741863251
}
703ms
IBM Watson
{
    "label": "es",
    "confidence": 0.79751059848721
}
3595ms
Microsoft Azure
{
    "label": "en",
    "confidence": 1.0
}
2912ms
SAP Leonardo
{
    "label": "en",
    "confidence": 0.9999449253082275
}
2989ms

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.