Skip to content
HALOWERK

Text Tools

icu whole token phrase locations

Phrase search returns source spans matching consecutive whole words across punctuation and spacing. Use it when an agent needs exact editor ranges for a multiword term.

POST https://text.halowerk.com/v1/icu-whole-token-phrase-locations

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
textstringYes
localestringNo
phrasestringYes
limitintegerNo
Show full input schema
{
  "type": "object",
  "properties": {
    "text": {
      "type": "string",
      "maxLength": 7000,
      "minLength": 1
    },
    "locale": {
      "type": "string",
      "maxLength": 45,
      "minLength": 1
    },
    "phrase": {
      "type": "string",
      "maxLength": 250,
      "minLength": 1
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 40
    }
  },
  "required": [
    "text",
    "phrase"
  ],
  "additionalProperties": false
}

Open original schema

Published input example

{
  "text": "Operating systems. Library management system.",
  "locale": "en",
  "phrase": "library management"
}

Result & documentation

Show published result schema
{
  "type": "object",
  "required": [
    "measured_at",
    "source",
    "data",
    "limitations"
  ],
  "properties": {
    "measured_at": {
      "type": "string"
    },
    "source": {
      "type": "object",
      "required": [
        "reference",
        "retrieved_at"
      ],
      "properties": {
        "reference": {
          "type": "string"
        },
        "retrieved_at": {
          "type": "string"
        }
      }
    },
    "data": {
      "type": "object",
      "properties": {
        "total": {
          "type": "integer"
        },
        "matches": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "start": {
                "type": "integer"
              },
              "end": {
                "type": "integer"
              }
            },
            "required": [
              "start",
              "end"
            ]
          }
        }
      },
      "required": [
        "total",
        "matches"
      ]
    },
    "limitations": {
      "type": "string"
    }
  }
}

Machine-readable documentation of this hub

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

More endpoints in this hub

All endpoints in this hub →