Gå til hovedinnhold

kapi exec qa

kapi qa [files...]

Kontroller oversettelseskvalitet med deterministiske regler eller en LLM (velg med --mode)

Commandexec qa
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 qa app.xliff --target-lang fr
Flags
FlagTypeDefaultDescription
--absolute-max-char-length int255Maximum number of characters allowed in any target segment
--api-key stringAPI key for the AI provider
--charset stringISO-8859-1Name of the character set encoding to check against (e.g. ISO-8859-1)
--check-absolute-max-char-length boolfalseFlag target segments that exceed an absolute character count limit
--check-charset boolfalseWarn if a target character is not included in the specified character set encoding
--check-code-difference booltrueVerify that target segments have the same inline codes as source segments
--check-corrupted-characters booltrueCheck for patterns indicating encoding corruption (mojibake
--check-double-spaces booltrueCheck for double spaces in target text
--check-doubled-word booltrueCheck for consecutive repeated words in target text
--check-empty-source booltrueCheck for non-empty target when source is empty
--check-empty-target booltrueCheck for empty target when source has content
--check-leading-whitespace booltrueCheck for leading whitespace mismatches between source and target
--check-max-char-length booltrueFlag targets longer than a percentage of source character length
--check-max-words boolfalseFlag target segments that exceed an absolute limit on the number of words
--check-min-char-length booltrueFlag targets shorter than a percentage of source character length
--check-patterns booltrueVerify that source patterns have expected corresponding content in the target
--check-source-inconsistency boolfalseFlag when different source texts share the same translation
--check-span-constraints booltrueCheck non-deletable and non-cloneable span constraint violations
--check-target-inconsistency boolfalseFlag when the same source text is translated differently across the run
--check-target-same-as-source booltrueCheck when target text is identical to source text
--check-terminology boolfalseEnable terminology checks
--check-trailing-whitespace booltrueCheck for trailing whitespace mismatches between source and target
--checks stringSliceQuality checks to perform (e.g. terminology fluency accuracy consistency)
--concurrency , -jint0max parallel files (0 = auto)
--consistency-case-sensitive booltrueWhether consistency comparison is case-sensitive
--credential stringsaved credential name to use (see 'kapi credentials list')
--doubled-word-exceptions stringsie;vous;nousSemicolon-separated list of words allowed to repeat (e.g. sie;vous;nous)
--encoding , -estringinput file encoding
--fail-on-unknown boolfalseexit with error if any file cannot be processed (default: skip with warning)
--forbidden-chars stringCharacters that must not appear in target text (e.g. {}[])
--format , -fstringoverride input format detection
--json boolfalseoutput results as JSON
--map , -mstringArraymap glob pattern to format (e.g. '*.docx=okf_openxml:test')
--max-char-length-above int200Maximum allowed percentage of source length for long text
--max-char-length-below int350Maximum allowed percentage of source length for short text
--max-char-length-break int20Character count above which text is considered long for the maximum length check
--max-words int0Maximum number of words allowed in any target segment
--min-char-length-above int45Minimum required percentage of source length for long text
--min-char-length-below int30Minimum required percentage of source length for short text
--min-char-length-break int20Character count above which text is considered long for the minimum length check
--mode stringrulesHow to check quality: deterministic local rules, or an AI provider's review (Deterministic rules, AI review)
--model stringAI model 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)
--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 stringanthropicAI provider (Anthropic, OpenAI, Gemini, Azure OpenAI, Claude Code, Ollama, Demo (illustrative))
--required-chars stringCharacters that must appear in target if present in source (e.g. punctuation)
--source-lang stringsource language (e.g. en, en-US; defaults to the project's source_language, else en)
--strict boolfalsealias for --fail-on-unknown
--strict-code-order boolfalseFlag differences when codes appear in a different order between source and target
--target-lang stringtarget language (e.g. fr, de-DE)
--target-same-as-source-with-codes booltrueInclude inline codes when comparing source and target for identity
--target-same-as-source-with-numbers booltrueInclude number-only segments in same-as-source comparison
--trace stringwrite flow trace JSON to file (for flow visualization)
More examples
kapi exec qa app.xliff --target-lang fr --provider anthropic
kapi exec qa app.xliff --target-lang de --json

← Back to the Command Reference