kapi segmentation
kapi segmentation [files...]Segmentation
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.jsonFlags
| Flag | Type | Default | Description |
|---|---|---|---|
| --concurrency, -j | int | 0 | max parallel files (0 = auto) |
| --credential | string | Stored credential name for the llm engine | |
| --encoding, -e | string | UTF-8 | input file encoding |
| --engine | string | Segmenter backend: srx (rule-based; default)/ uax29 (Unicode baseline)/ llm (semantic chunks)/ sat (ML model) | |
| --fail-on-unknown | bool | false | exit with error if any file cannot be processed (default: skip with warning) |
| --format, -f | string | override input format detection | |
| --instruction | string | Optional guidance for the llm engine | |
| --json | bool | false | output results as JSON |
| --layer | string | Segmentation overlay layer name; empty uses the engine's natural layer | |
| --map, -m | stringArray | map glob pattern to format (e.g. '*.docx=okf_openxml:test') | |
| --model | string | Model name for the llm or sat engine | |
| --no-warn | bool | false | suppress warnings for skipped files |
| --output, -o | string | output path template (variables: {dir}, {name}, {ext}, {lang}) | |
| --output-dir | string | write outputs under DIR/{lang}/ (default: beside the input, mirroring its locale layout) | |
| --overwrite-segmentation | bool | false | Re-segment already-segmented blocks replacing previous segmentation |
| --pack | bool | false | when transforming a .klz, also eject the result to the .klz (auto-pack) |
| --parallel-blocks | int | 0 | fan out block processing across N goroutines (0 = off) |
| --progress, -p | bool | false | show progress bar |
| --provider | string | AI provider id for the llm engine | |
| --renumber-codes | bool | false | Renumber inline code IDs when materializing segments to a bilingual format |
| --sat-model | string | SaT model for the sat engine (e.g. sat-3l-sm | |
| --segment-source | bool | true | Segment the source text |
| --segment-target | bool | false | Segment existing target text |
| --source-lang | string | en | source language (e.g. en, en-US) |
| --source-srx-path | string | Path to an SRX 2.0 rules file for source text (srx engine) | |
| --strict | bool | false | alias for --fail-on-unknown |
| --target-lang | string | target language (e.g. fr, de-DE) | |
| --target-srx-path | string | Path to an SRX 2.0 rules file for target text (srx engine) | |
| --threshold | float64 | 0 | Boundary probability threshold for the sat engine (0 = model default) |
| --trace | string | write flow trace JSON to file (for flow visualization) | |
| --treat-isolated-codes-as-whitespace | bool | false | Treat isolated inline codes as whitespace during segmentation |
| --trim-leading-whitespace | bool | true | Exclude leading whitespace from each segment span |
| --trim-trailing-whitespace | bool | true | Exclude trailing whitespace from each segment span |
More examples
kapi segmentation app.xliff← Back to the Command Reference