Skip to content
HALOWERK

Denkwerk

language match

Detects languages with franc-min 6.2 (MIT; trigram profiles from the Universal Declaration of Human Rights, 82 languages with at least 8 million speakers, ISO 639-3). The question (or expected_language) sets the target; the answer is checked as a whole and in segments (paragraphs, long paragraphs split into sentence groups of at least segment_min_chars characters). Reports the share of answer characters in segments of the expected language, a mixed-language flag (any confident segment in.

POST https://denk.halowerk.com/v1/language-match

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
answerstringYesThe answer to check.
questionstringNoThe question; its language is the target unless expected_language is given.
expected_languagestringNoTarget language as ISO 639-1 or 639-3 code (overrides the question).
candidatesarrayNoRestrict detection to these languages.
segment_min_charsintegerNo
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "answer"
  ],
  "properties": {
    "answer": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100000,
      "description": "The answer to check."
    },
    "question": {
      "type": "string",
      "minLength": 1,
      "maxLength": 20000,
      "description": "The question; its language is the target unless expected_language is given."
    },
    "expected_language": {
      "type": "string",
      "pattern": "^[a-z]{2,3}$",
      "description": "Target language as ISO 639-1 or 639-3 code (overrides the question)."
    },
    "candidates": {
      "type": "array",
      "minItems": 2,
      "maxItems": 20,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "pattern": "^[a-z]{2,3}$"
      },
      "description": "Restrict detection to these languages."
    },
    "segment_min_chars": {
      "type": "integer",
      "minimum": 20,
      "maximum": 2000,
      "default": 60
    }
  }
}

Open original schema

Published input example

{
  "question": "Wie hoch ist die Mehrwertsteuer in Deutschland?",
  "answer": "The standard VAT rate in Germany is 19 percent."
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.

More endpoints in this hub

All endpoints in this hub โ†’