Home Explore Blog CI



ragit

docs/commands/ls-terms.txt
c9612f1d5fa359c7d692c1e717bab385decc8d5750de42b4000000030000047a
rag-ls-terms(1)
==========

NAME
----
rag-ls-terms - Show information about search terms

SYNOPSIS
--------
[verse]
'rag ls-terms' [--term-only | --stat-only] [--json | -j] [<uid>..]

DESCRIPTION
-----------
Run `rag help uid-query` to read how uid-query works. If the uid is of an
image, it dies. Later versions will allow `rag ls-terms` on images.

Ragit uses tfidf algorithm to retrieve texts, and tfidf uses a tokenizer.
This command shows how your documents are tokenized. It shows how many times
each term in a chunk appears. It's also known as TF (term-frequency). If you
provide a uid of a file, it merges TFs of chunks in the file. It's NOT a TF
of merged chunks, but a merged TF of chunks. It's different because chunks have
sliding windows. If a term appears once in a file, but is included in a sliding
window. `rag ls-terms` will tell you that the term appears twice.

If no uid is given, it shows a merged TF of all the chunks.

If `--json` is set, it dumps a valid json to stdout. Its schema is,

- no flags: `{ term: term_count }`
- `--term-only`: `[term: string]`
- `--stat-only`: `{ "terms": integer, "unique terms": integer }`

Chunks
626ce27d (1st chunk of `docs/commands/ls-terms.txt`)
Title: Rag Ls-Terms Command
Summary
The rag-ls-terms command displays detailed information about search terms, including term frequency, and can output results in JSON format with optional flags to customize the output, such as showing only term names or statistical information, and it can merge term frequencies from multiple chunks in a file or display a merged term frequency for all chunks if no specific file is specified.