Sentence Segmenter
text.segment_sentences
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
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
Capabilities
Cost & billing
Flat rate per invocation
File handling
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.
| Limit | Value | Limited by |
|---|---|---|
| Maximum size per input file | 1.9 MiB | Skill maximum |
How we handle your data
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.
Input schema
| Field | Type | Required | Description |
|---|---|---|---|
| text | string | No | Bounded inline text source. Required unless file_ref is provided. |
| file_ref | string | No | Tenant-scoped opaque text-file reference. Omit it to use the required inline text; never send both. |
| language | string | No | Optional BCP 47 language hint; omit it for ICU root-locale rules. |
| includeOffsets | boolean | No | Whether source offsets are returned; omit it for true. |
| preserveWhitespace | boolean | No | Whether surrounding whitespace is retained; omit it for false. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| sentences | array | Yes | Bounded 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. |
| count | integer | Yes | Returned sentence count. |
API contract
POST /v1/executecurl -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"}}'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
| Code | HTTP | Retryable | Description |
|---|---|---|---|
| VALIDATION_ERROR | 400 | No | The request payload failed schema validation. |
| UNAUTHORIZED | 401 | No | Missing or invalid API key. |
| SKILL_NOT_ACCESSIBLE | 403 | No | The API key is not granted access to this skill. |
| SKILL_NOT_AVAILABLE_FOR_PLAN | 403 | No | This skill is not included in your current plan. |
| PLAN_ELIGIBILITY_UNAVAILABLE | 503 | Yes | Plan eligibility could not be decided. Retry after backoff. |
| SKILL_NOT_FOUND | 404 | No | The requested skill or version does not exist. |
| TENANT_RATE_LIMITED | 429 | Yes | Request rate limit exceeded. Retry after backoff. |
| QUOTA_EXCEEDED | 429 | Yes | Plan quota exhausted. Retryable once the quota period resets. |
| EXECUTION_TIMEOUT | 504 | Yes | Execution exceeded the allowed time budget. |
Other limits
| Limit | Value |
|---|---|
| Recommended inline bytes | 32 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)
{
"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
{
"text": "Revenue grew 12.5% last quarter. The board approved the plan... Next review is in June."
}{
"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
}
]
}Text only, offsets turned off
{
"includeOffsets": false,
"text": "The U.S.A. spans 3.79 million square miles. It has 50 states."
}{
"count": 2,
"sentences": [
{
"index": 0,
"text": "The U.S.A. spans 3.79 million square miles."
},
{
"index": 1,
"text": "It has 50 states."
}
]
}Segment an uploaded document
{
"file_ref": "squillify://files/f-abc123"
}{
"count": 48,
"sentences": [
{
"text": "First sentence.",
"startOffset": 0,
"endOffset": 16,
"index": 0
}
]
}Recommended use cases
- 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
Related skills
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.