Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

API Fields:

...

  • "type" must always be specified as "application".

...

  • "_type" must always be specified as "application".

...

  • "description" must be a descriptive string without spaces.

...

  • "config" must always be specified as "com.accenture.aspire:app-language-detector".

...

  • "appType" must always be specified as "language-detector".

...

  • "appName" must always be specified as "Language Detector".


FieldRequiredDefaultMultipleNotesExample
propertiesYes-NoConfiguration object
sourceFieldYesfalseNoSelects how to enter the Elasticsearch URL. True: server and port are specified. False: full URL is specified.true / false
detectedLanguageFieldYes"detected_language"NoThe field where the main detected language will be written."detected_language"
detectionTypeYes"All"NoSelect the type of detection to be used."All"
languagePoolNo"languagePool"NoIf detectionType "All" is selected, the value must be "languagePool" "languagePool" 
extractConfidenceValuesNofalseNoCheck if confidence statistics extraction is required.false
detectionOutputNo"detection_output"NoOnly required if "extractConfidenceValues" is enabled. The field where all detected languages and its statistics will be written."detection_output"
debugNofalseNoCheck to enable debug messages.false
limitTextSizeNofalseNoLimit Source Field text sizefalse
textSizeLimitNo128NoOnly required if "limitTextSize" is enabled. Maximum size for Source Field's text.128
includeISOCodesNofalseNoIf enabled, ISO codes will be included in the document.false
includeISO639_1NofalseNoCheck to include the ISO 639-1 codes in the document.false
includeISO639_3NofalseNoCheck to include the ISO 639-3 codes in the document.false



Create example

...

Code Block
themeRDark
titlePOST /aspire/_api/connections
# All languages
{
    "type": "application",
    "_type": "application",
    "description": "sample-ld-2",
    "config": "com.accenture.aspire:app-language-detector",
    "appType": "language-detector",
    "appName": "Language Detector",
    "properties": {
        "sourceField": "content",
        "detectedLanguageField": "detected_language",
        "detectionType": "All",
        "languagePool": "languagePool",
        "extractConfidenceValues": false,
        "detectionOutput": "detection_output",
        "debug": false,
        "limitTextSize": false,
        "textSizeLimit": 128,
        "includeISOCodes": false,
        "includeISO639_1": false,
        "includeISO639_3": false
    }
}

# Spoken Language
{
    "type": "application",
    "_type": "application",
    "description": "sample-ld-3",
    "config": "com.accenture.aspire:app-language-detector",
    "appType": "language-detector",
    "appName": "Language Detector",
    "properties": {
        "sourceField": "content",
        "detectedLanguageField": "detected_language",
        "detectionType": "Spoken",
        "languagePool": "languagePool",
        "extractConfidenceValues": false,
        "detectionOutput": "detection_output",
        "debug": false,
        "limitTextSize": false,
        "textSizeLimit": 128,
        "includeISOCodes": false,
        "includeISO639_1": false,
        "includeISO639_3": false
    }
}

# Cyrillic Language
{
    "type": "application",
    "_type": "application",
    "description": "sample-ld-3",
    "config": "com.accenture.aspire:app-language-detector",
    "appType": "language-detector",
    "appName": "Language Detector",
    "properties": {
        "sourceField": "content",
        "detectedLanguageField": "detected_language",
        "detectionType": "Cyrillic",
        "languagePool": "languagePool",
        "extractConfidenceValues": false,
        "detectionOutput": "detection_output",
        "debug": false,
        "limitTextSize": false,
        "textSizeLimit": 128,
        "includeISOCodes": false,
        "includeISO639_1": false,
        "includeISO639_3": false
    }
}

#Specific
{
    "type": "application",
    "_type": "application",
    "description": "sample-ld-1",
    "config": "com.accenture.aspire:app-language-detector",
    "appType": "language-detector",
    "appName": "Language Detector",
    "properties": {
        "sourceField": "content",
        "detectedLanguageField": "detected_language",
        "detectionType": "Specific",
        "languagePool": [
            "Afrikaans",
            "Albanian"
        ],
        "extractConfidenceValues": false,
        "detectionOutput": "detection_output",
        "debug": false,
        "limitTextSize": false,
        "textSizeLimit": 128,
        "includeISOCodes": false,
        "includeISO639_1": false,
        "includeISO639_3": false
    }
}

#Except
{
    "type": "application",
    "_type": "application",
    "description": "sample-ld-1",
    "config": "com.accenture.aspire:app-language-detector",
    "appType": "language-detector",
    "appName": "Language Detector",
    "properties": {
        "sourceField": "content",
        "detectedLanguageField": "detected_language",
        "detectionType": "Except",
        "languagePool": [
            "Afrikaans",
            "Albanian"
        ],
        "extractConfidenceValues": false,
        "detectionOutput": "detection_output",
        "debug": false,
        "limitTextSize": false,
        "textSizeLimit": 128,
        "includeISOCodes": false,
        "includeISO639_1": false,
        "includeISO639_3": false
    }
}