Skip to main content

kapi terms occurrences

kapi occurrences [term-or-concept]

Show where a term is used in the project's extracted content.

The argument is a term as written, or a concept id. A concept is searched for under every term it carries, in every language, so an approved English term is found in the source text and its counterpart in the translated text.

Matching folds case, spans any whitespace between a term's words, and requires a word boundary, so "AI" is not a use of "again". Scripts written without word separators are matched without that rule. A term is also found under each form it declares, so a term "varsel" that lists "varsler" finds the plural, and a form typed as the argument finds its term.

The project must have been extracted: occurrences are read from the block cache inside the project store, which kapi up and kapi extract fill.

Commandterms occurrences
Try it

Runs in your browser against a small sample file. Edit the command before running, or press Run to execute it as shown.

kapi terms occurrences "content memory"
Flags
FlagTypeDefaultDescription
--collectionstringonly blocks in this collection
--filestringexplicit path to resource file
--limitint50max occurrences to show
--localboolfalseuse resource in current directory
--locale, -lstringSliceonly text in these locales; 'source' for the source text (default: all)
--namestringnamed resource in KAPI_HOME (e.g. --name project-terms)
--project, -pstringpath to a kapi.yaml project recipe or its directory (auto-discovered from cwd if omitted)
More examples
kapi terms occurrences c-dashboard --locale nb
kapi terms occurrences "log in" --collection docs --json

← Back to the Command Reference