Skip to main content

Squillify development is paused indefinitely. Read why, and discover what this experiment achieved. Read the story

MicroSkills Reference

Sentence Segmenter

text.segment_sentences

ProductionEngine wrapper (Class A)Deterministicstrictfastv1.0.0
File inputNo network

Overview

Splits your text into sentences with Unicode-standard, locale-aware boundary rules, so decimals like 3.79, multi-dot abbreviations like U.S.A., and ellipses stay inside one sentence instead of splitting it. You get the sentences in order, each with its index and, unless you turn offsets off, the exact character range it occupies in your text. Accepts file input via file_ref — no need to extract file content first.

Sentence boundaries are tricky — abbreviations, decimals, and ellipses fool naive split-on-period rules. We use ICU4J so you get linguistically correct boundaries without LLM guessing.

Reliability

STRICT and deterministic for a given language setting on this deployment. Boundaries may shift after an ICU4J upgrade (version-sensitive). A language tag we have no rules for is accepted and falls back to generic behaviour rather than failing. Input validation (not retryable): neither text nor file_ref; both text and file_ref; text longer than 1,048,576 characters.

Context footprint

Returns structured sentence boundaries that eliminate LLM regex-based splitting attempts. Accepts inline text up to 1048576 chars or file input via file_ref (up to 2 MB). Upload files via POST /v1/files/upload before passing file_ref. A successful call costs 2 execution credits.

When to use it

When you need sentence boundaries for readability analysis, NLP preprocessing, or sentence-aligned chunking.

Do not use for word tokenization, paragraph splitting, or when text is already pre-segmented.

Powered by ICU4J, the Unicode Consortium's library for linguistically correct, locale-aware sentence boundary detection.

Scope

Note
Segments your text into sentences with locale-aware Unicode boundary rules. Decimals, multi-dot abbreviations such as U.S.A., and ellipses stay inside a sentence; a single-word title such as "Dr." does end one. Returns ordered sentences with optional character offsets for precise slicing.

Non-goals

  • Does not detect language — provide language hint or use text.detect_language first
  • Does not summarize or paraphrase — output is verbatim text segments
  • Does not perform word tokenization — use a dedicated tokenizer for that

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

parsingtext-processing

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call2 credits

File handling

Accepts file_refProduces file_refMax input1 MBMax file size1.9 MB

File limits

Constraints this skill applies to your input and generated files. The “Limited by” column shows the static source of each cap; none of these can be raised by upgrading your plan.

LimitValueLimited by
Maximum size per input file1.9 MiBSkill maximum

How we handle your data

Sensitive output possible
What this means

This skill may receive sensitive content and may return submitted, transformed, extracted, or reformatted content.

Squillify guarantees
  • Runs inside Squillify using a self-contained open-source component
  • This skill runs inside Squillify.
  • Payloads are not sent to an external service by this skill.
  • Self contained open source component
  • Squillify does not permanently store submitted payloads.
  • Telemetry records metadata only, not submitted content.
  • Submitted payloads are not used for training.
  • Submitted payloads are not reviewed by humans.
  • This skill does not target sensitive data.
  • The response may contain submitted or transformed content.
Your responsibility

Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.

Read the Microskill Data Handling Policy

Input schema

FieldTypeRequiredDescription
textstringNoBounded inline text source. Required unless file_ref is provided.
file_refstringNoTenant-scoped opaque text-file reference. Omit it to use the required inline text; never send both.
languagestringNoOptional BCP 47 language hint; omit it for ICU root-locale rules.
includeOffsetsbooleanNoWhether source offsets are returned; omit it for true.
preserveWhitespacebooleanNoWhether surrounding whitespace is retained; omit it for false.

Output schema

FieldTypeRequiredDescription
sentencesarrayYesBounded array of sentence receipts in source order with index, text, and optional offsets. The item shape is defined by the nested schema and the array contains from 0 through 2000000 items.
countintegerYesReturned sentence count.

API contract

POST /v1/execute
curl
curl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"text.segment_sentences","input":{"text":"Dr. Smith arrived. The meeting started.","language":"en"}}'
Integrations
TypeScript SDK
import { Squillify } from "@squillify/sdk";

const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });

const { output } = await sq.execute("text.segment_sentences", {"text":"Revenue grew 12.5% last quarter. The board approved the plan... Next review is in June."});

Errors

CodeHTTPRetryableDescription
VALIDATION_ERROR400NoThe request payload failed schema validation.
UNAUTHORIZED401NoMissing or invalid API key.
SKILL_NOT_ACCESSIBLE403NoThe API key is not granted access to this skill.
SKILL_NOT_AVAILABLE_FOR_PLAN403NoThis skill is not included in your current plan.
PLAN_ELIGIBILITY_UNAVAILABLE503YesPlan eligibility could not be decided. Retry after backoff.
SKILL_NOT_FOUND404NoThe requested skill or version does not exist.
TENANT_RATE_LIMITED429YesRequest rate limit exceeded. Retry after backoff.
QUOTA_EXCEEDED429YesPlan quota exhausted. Retryable once the quota period resets.
EXECUTION_TIMEOUT504YesExecution exceeded the allowed time budget.

Other limits

LimitValue
Recommended inline bytes32 KiB

Limitations

  • Does not detect language — provide language hint or use text.detect_language first
  • Does not summarize or paraphrase — output is verbatim text segments
  • Does not perform word tokenization — use a dedicated tokenizer for that
  • Paragraph-level splitting (use line-break heuristics instead)
  • Word tokenization or morphological analysis
  • Summarization or content reduction

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "text.segment_sentences",
  "input": {
    "text": "Revenue grew 12.5% last quarter. The board approved the plan... Next review is in June."
  }
}

Examples

Decimals and an ellipsis stay inside their sentence

Inputjson
{
  "text": "Revenue grew 12.5% last quarter. The board approved the plan... Next review is in June."
}
Expected outputjson
{
  "count": 3,
  "sentences": [
    {
      "text": "Revenue grew 12.5% last quarter.",
      "startOffset": 0,
      "endOffset": 33,
      "index": 0
    },
    {
      "text": "The board approved the plan...",
      "startOffset": 33,
      "endOffset": 64,
      "index": 1
    },
    {
      "text": "Next review is in June.",
      "startOffset": 64,
      "endOffset": 87,
      "index": 2
    }
  ]
}
Tip
Each range runs to the start of the next sentence, so it includes the space after the full stop while text comes back trimmed

Text only, offsets turned off

Inputjson
{
  "includeOffsets": false,
  "text": "The U.S.A. spans 3.79 million square miles. It has 50 states."
}
Expected outputjson
{
  "count": 2,
  "sentences": [
    {
      "index": 0,
      "text": "The U.S.A. spans 3.79 million square miles."
    },
    {
      "index": 1,
      "text": "It has 50 states."
    }
  ]
}
Tip
A multi-dot abbreviation holds together, but a standalone title such as "Dr." is read as a sentence of its own — check before relying on it

Segment an uploaded document

Inputjson
{
  "file_ref": "squillify://files/f-abc123"
}
Expected outputjson
{
  "count": 48,
  "sentences": [
    {
      "text": "First sentence.",
      "startOffset": 0,
      "endOffset": 16,
      "index": 0
    }
  ]
}
Tip
Upload the file with POST /v1/files/upload first, then pass the file_ref it returns (only the first sentence is shown here)
  • Split text into sentences for readability scoring or analysis
  • NLP preprocessing requiring sentence-level boundaries
  • Chunk long documents into sentence-aligned segments for embedding

Avoid for

  • Paragraph-level splitting (use line-break heuristics instead)
  • Word tokenization or morphological analysis
  • Summarization or content reduction

Composable with

Safety & privacy

  • Runs without calling any external service.
  • Your payloads are never stored permanently.
  • Telemetry captures metadata only — never your payload contents.
  • We never train models on your payloads.
  • No human reviews your payloads.

Tags

textanalysisparsing