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 the field 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 and b with a suffix of lang, the output fields will be a_lang and b_lang

©2024 Pureinsights Technology Corporation