Skip to main content

Segmentation tool

The Segmentation tool marks sentence or chunk boundaries within each block. It records them as a stand-off overlay and leaves the block's runs unchanged, so dropping the overlay restores the unsegmented block. --engine selects the segmenter:

  • srx, the default, finds sentence boundaries with built-in rules and needs no configuration. rulesPath loads an SRX 2.0 rules file in their place.
  • uax29 applies the Unicode default sentence boundaries, with no language-specific exceptions.
  • llm asks an AI provider for meaning-based chunks rather than sentences.

Plugins can register further engines, which appear as options. Bilingual formats write the sentence layer as segments. A block that already has a layer keeps it unless overwriteSegmentation is set.

IDsegmentation
SourceBuilt-in
CategoryText processing
Cardinalitymonolingual
Tagstext-processing

Parameters

ParameterTypeDefaultDescription
enginestringsrxWhich segmenter to use; the default needs no configuration
layerstringSegmentation overlay layer name; empty uses the engine's natural layer
overwriteSegmentationbooleanfalseRe-segment already-segmented blocks replacing previous segmentation
providerstringAI provider id (anthropic
rulesPathstringPath to a custom SRX 2.0 rules file (overrides the built-in ruleset)
modelstringModel name
segmentSourcebooleantrueSegment the source text
treatIsolatedCodesAsWhitespacebooleanfalseTreat isolated inline codes as whitespace during segmentation
credentialstringStored credential name
segmentTargetbooleanfalseSegment existing target text
trimLeadingWhitespacebooleantrueExclude leading whitespace from each segment span
instructionstringOptional guidance for how to chunk
trimTrailingWhitespacebooleantrueExclude trailing whitespace from each segment span
maxChunkRunesintegerSoft upper bound on chunk size in characters (0 = model default)
renumberCodesbooleanfalseRenumber inline code IDs when materializing segments to a bilingual format

Configure it live

Configuration
Loading form…

Examples

Segment the source with the default rules

Mark sentence boundaries using the built-in rules.

segmentSource: true

Re-segment with a custom SRX file

Replace existing segmentation using project-specific rules.

engine: srx
overwriteSegmentation: true
rulesPath: ./rules/segmentation.srx

Processing notes

  • Operates on translatable blocks only; non-translatable blocks pass through unchanged.

  • When the source is written to the sentence layer, the segment count is recorded in the block property segment-count.

Limitations

  • The built-in rule set targets common Latin-script sentence boundaries; non-Latin scripts may need a custom SRX file.

  • The llm engine calls a hosted provider unless a local one is chosen, and needs a credential for a hosted provider.

← Back to the Tool Reference