Skip to content
HALOWERK

Textwerk

bidi check

Lists all bidi controls (ALM, LRM, RLM, LRE, RLE, PDF, LRO, RLO, LRI, RLI, FSI, PDI) with position and name, tracks the embedding/isolate stack per paragraph as in UAX #9 (X1–X8, paragraph separators of class B) and reports unterminated or stray controls. The paragraph base direction follows UAX #9 P2/P3 (first strong L, R or AL outside isolates) using DerivedBidiClass.txt 17.0.0. For file names with one override the displayed name is approximated, e.g. invoice‮fdp.exe shown as.

POST https://text.halowerk.com/v1/bidi-check

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
textstringYesText, source code, file name or identifier.
contextstringNoWhere the text is used; code, file names and identifiers are graded more strictly.
return_sanitizedbooleanNoAlso return the text with all bidi controls removed.
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "text"
  ],
  "properties": {
    "text": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100000,
      "description": "Text, source code, file name or identifier."
    },
    "context": {
      "type": "string",
      "enum": [
        "text",
        "code",
        "filename",
        "identifier"
      ],
      "default": "text",
      "description": "Where the text is used; code, file names and identifiers are graded more strictly."
    },
    "return_sanitized": {
      "type": "boolean",
      "default": false,
      "description": "Also return the text with all bidi controls removed."
    }
  }
}

Open original schema

Published input example

{
  "text": "rechnung‮fdp.exe",
  "context": "filename"
}

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 →