Gå til hovedinnhold

kapi exec segmentation

kapi segmentation [files...]

Del kildetekst inn i setnings- eller chunk-segmenter (stand-off-overlegg)

Commandexec segmentation
Aliasessegment
Try it (demo)

Demo mode — illustrative output from a built-in stub, not a real model. Install the CLI to run with your own API key.

kapi exec segmentation messages.json
Flags
FlagTypeDefaultDescription
--concurrency , -jint0max parallel files (0 = auto)
--credential stringStored credential name
--encoding , -estringinput file encoding
--engine stringsrxWhich segmenter to use; the default needs no configuration (Rule-based (hybrid SRX/UAX-29), Unicode baseline (UAX-29), LLM (semantic chunks))
--fail-on-unknown boolfalseexit with error if any file cannot be processed (default: skip with warning)
--format , -fstringoverride input format detection
--instruction stringOptional guidance for how to chunk
--json boolfalseoutput results as JSON
--layer stringSegmentation overlay layer name; empty uses the engine's natural layer
--map , -mstringArraymap glob pattern to format (e.g. '*.docx=okf_openxml:test')
--max-chunk-runes int0Soft upper bound on chunk size in characters (0 = model default)
--model stringModel name
--no-warn boolfalsesuppress warnings for skipped files
--output , -ostringoutput path template (variables: {dir}, {name}, {ext}, {lang})
--output-dir stringwrite outputs under DIR/{lang}/ (default: beside the input, mirroring its locale layout)
--overwrite-segmentation boolfalseRe-segment already-segmented blocks replacing previous segmentation
--pack boolfalsewhen transforming a .kpz, also eject the result to the .kpz (auto-pack)
--parallel-blocks int0fan out block processing across N goroutines (0 = off)
--progress , -pboolfalseshow progress bar
--provider stringAI provider id (anthropic
--renumber-codes boolfalseRenumber inline code IDs when materializing segments to a bilingual format
--rules-path stringPath to a custom SRX 2.0 rules file (overrides the built-in ruleset)
--segment-source booltrueSegment the source text
--segment-target boolfalseSegment existing target text
--source-lang stringsource language (e.g. en, en-US; defaults to the project's source_language, else en)
--strict boolfalsealias for --fail-on-unknown
--target-lang stringtarget language (e.g. fr, de-DE)
--trace stringwrite flow trace JSON to file (for flow visualization)
--treat-isolated-codes-as-whitespace boolfalseTreat isolated inline codes as whitespace during segmentation
--trim-leading-whitespace booltrueExclude leading whitespace from each segment span
--trim-trailing-whitespace booltrueExclude trailing whitespace from each segment span
More examples
kapi exec segmentation app.xliff

← Back to the Command Reference