language detector Processor
Use the language detector to detect the language of a text.
Configuration
Example configuration in a processor:
{
"field": "description",
"name": "language detector",
"type": "language-detector",
"languages" : ["english", "spanish", "italian", "french"],
"maxLength" : 100,
"minDistance": 0.25
}
Example configuration in a processor with multiple fields:
{
"fields": ["name", "description", "notes"],
"suffix": "lang",
"name": "language detector",
"type": "language-detector",
"languages" : ["english", "spanish", "italian", "french"],
"maxLength" : 100,
"minDistance": 0.25
}
Configuration parameters:
field
(Required, String) Field where the language detector is executed.
languages
(Optional, List) Specify all languages the app should recognize.
maxLength
(Optional, Int) Maximum number of chars to analyze through the language detector
minDistance
(Optional, int) Minimum distance between the language probabilities. A value between 0.0 and 0.99. Defaults to 0.0.
fields
(Optional, List) Specify all the fields where the language detector is executed. The field
parameter takes precedence over this parameter
NOTE: If the parameter
fields
is used, there's no need to use thefield
parameter
suffix
(Optional, String) Suffix for the output field of the language detector. If no suffix is provided then the detected language short name will be used instead.
Example: es
for spanish
Example: If the fields are
a
andb
with a suffix oflang
, the output fields will bea_lang
andb_lang
©2024 Pureinsights Technology Corporation