kapi memory import
kapi import [file]Import a single TMX file (plain or .gz) or a native .memory.json bundle into the content memory.
The bundle is the native content-memory form: a deterministic, lossless JSON serialization that round-trips every Entry field (entity mappings, provenance origins, properties, notes) that TMX drops. Importing one preserves entry identity verbatim, so re-seeding a content memory from committed bundles is fully reproducible. The format is selected by file extension; --format overrides.
By default, imports entries matching the given --source-locale and --target-locale. Use --all-pairs to emit entries for every (src, tgt) language pair present in each TU — useful for multilingual TMX files (e.g. EUR-Lex Euramis exports where a single TU may contain 24+ languages). Combine with --locales to restrict the pair set (e.g. --all-pairs --locales en-GB,fr,de).
The importer auto-detects UTF-8/UTF-16 from the BOM, so Euramis exports work without pre-conversion. For web-crawl TMX sets (bitextor output) the per-TUV <prop type="source-document"> URL is recorded as Origin.Reference.
Runs in your browser against a small sample file. Edit the command before running, or press Run to execute it as shown.
kapi memory import corpus.tmx -s en -t fr| Flag | Type | Default | Description |
|---|---|---|---|
| --all-pairs | bool | false | emit entries for every (src,tgt) pair present in each TU (multilingual TMX) |
| --file | string | explicit path to resource file | |
| --format | string | auto | input format (auto, tmx, bundle); auto selects by file extension |
| --local | bool | false | use resource in current directory |
| --locales | string | comma-separated locale subset for --all-pairs (empty = all languages in file) | |
| --name | string | named resource in KAPI_HOME (e.g. --name project-terms) | |
| --source-locale, -s | string | en | source locale |
| --target-locale, -t | string | target locale |
kapi memory import corpus.tmx --all-pairs --locales en,fr,de --name my-tm kapi memory import seeds/builtins-nb.memory.json← Back to the Command Reference