Gå til hovedinnhold

kapi segmentation

kapi segmentation [files...]

Segmentation

Commandsegmentation
Grouptext-processing
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 segmentation messages.json
Flags
FlagTypeDefaultDescription
--concurrency, -jint0max parallel files (0 = auto)
--credentialstringStored credential name for the llm engine
--encoding, -estringUTF-8input file encoding
--enginestringSegmenter backend: srx (rule-based; default)/ uax29 (Unicode baseline)/ llm (semantic chunks)/ sat (ML model)
--fail-on-unknownboolfalseexit with error if any file cannot be processed (default: skip with warning)
--format, -fstringoverride input format detection
--instructionstringOptional guidance for the llm engine
--jsonboolfalseoutput results as JSON
--layerstringSegmentation overlay layer name; empty uses the engine's natural layer
--map, -mstringArraymap glob pattern to format (e.g. '*.docx=okf_openxml:test')
--modelstringModel name for the llm or sat engine
--no-warnboolfalsesuppress warnings for skipped files
--output, -ostringoutput path template (variables: {dir}, {name}, {ext}, {lang})
--output-dirstringwrite outputs under DIR/{lang}/ (default: beside the input, mirroring its locale layout)
--overwrite-segmentationboolfalseRe-segment already-segmented blocks replacing previous segmentation
--packboolfalsewhen transforming a .klz, also eject the result to the .klz (auto-pack)
--parallel-blocksint0fan out block processing across N goroutines (0 = off)
--progress, -pboolfalseshow progress bar
--providerstringAI provider id for the llm engine
--renumber-codesboolfalseRenumber inline code IDs when materializing segments to a bilingual format
--sat-modelstringSaT model for the sat engine (e.g. sat-3l-sm
--segment-sourcebooltrueSegment the source text
--segment-targetboolfalseSegment existing target text
--source-langstringensource language (e.g. en, en-US)
--source-srx-pathstringPath to an SRX 2.0 rules file for source text (srx engine)
--strictboolfalsealias for --fail-on-unknown
--target-langstringtarget language (e.g. fr, de-DE)
--target-srx-pathstringPath to an SRX 2.0 rules file for target text (srx engine)
--thresholdfloat640Boundary probability threshold for the sat engine (0 = model default)
--tracestringwrite flow trace JSON to file (for flow visualization)
--treat-isolated-codes-as-whitespaceboolfalseTreat isolated inline codes as whitespace during segmentation
--trim-leading-whitespacebooltrueExclude leading whitespace from each segment span
--trim-trailing-whitespacebooltrueExclude trailing whitespace from each segment span
More examples
kapi segmentation app.xliff

← Back to the Command Reference