Skip to content
HALOWERK

Textwerk

glossary enforce

For every glossary entry the source term is searched in each source segment with Unicode word boundaries (multi-word terms with flexible spacing); in stem mode simple inflection suffixes (s, es, e, en, n, er, ern, em, ens, 's) are accepted on the last word, which covers regular German and English plurals and cases. If the source term occurs, one of the allowed target terms must occur in the target; forbidden variants are reported wherever they appear. Case-insensitive unless an entry is.

POST https://text.halowerk.com/v1/glossary-enforce

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
segmentsarrayYesSource/target segment pairs.
glossaryarrayYesGlossary entries.
matchstringNostem accepts simple inflection suffixes on the last word.
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "segments",
    "glossary"
  ],
  "properties": {
    "segments": {
      "type": "array",
      "minItems": 1,
      "maxItems": 2000,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "source",
          "target"
        ],
        "properties": {
          "id": {
            "type": "string",
            "maxLength": 200,
            "description": "Optional segment id, returned with the findings."
          },
          "source": {
            "type": "string",
            "maxLength": 5000,
            "description": "Source text."
          },
          "target": {
            "type": "string",
            "maxLength": 5000,
            "description": "Translation."
          }
        }
      },
      "description": "Source/target segment pairs."
    },
    "glossary": {
      "type": "array",
      "minItems": 1,
      "maxItems": 2000,
      "description": "Glossary entries.",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "source",
          "target"
        ],
        "properties": {
          "source": {
            "type": "string",
            "maxLength": 200,
            "description": "Source term."
          },
          "target": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200
              },
              {
                "type": "array",
                "minItems": 1,
                "maxItems": 10,
                "items": {
                  "type": "string",
                  "maxLength": 200
                }
              }
            ],
            "description": "Required target term or list of allowed target terms."
          },
          "forbidden": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "type": "string",
              "maxLength": 200
            },
            "description": "Target variants that must not be used."
          },
          "case_sensitive": {
            "type": "boolean",
            "default": false,
            "description": "Match the terms case-sensitively."
          },
          "note": {
            "type": "string",
            "maxLength": 500,
            "description": "Note returned with violations of this entry."
          }
        }
      }
    },
    "match": {
      "type": "string",
      "enum": [
        "exact",
        "stem"
      ],
      "default": "stem",
      "description": "stem accepts simple inflection suffixes on the last word."
    }
  }
}

Open original schema

Published input example

{
  "segments": [
    {
      "id": "1",
      "source": "Click Save to store the invoice.",
      "target": "Klicken Sie auf Sichern, um die Rechnung zu speichern."
    }
  ],
  "glossary": [
    {
      "source": "Save",
      "target": "Speichern",
      "case_sensitive": true
    },
    {
      "source": "invoice",
      "target": "Rechnung"
    }
  ]
}

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 →