
 Usage: semkit read [IN] bm25 [OPTIONS] [QUERY]

 Okapi BM25 of each text for a query: one score per text, rounded to 4 decimals.

 Terms are the lemmas without stopwords, on both sides; a term repeated in the query counts once. A
 word without a lemma (a single letter, an abbreviation or a unit: «г», «руб», «см») is no term.
 The length of a text is its number of terms. idf = ln((N - df + 0.5) / (df + 0.5) + 1); N, df and
 the average length are taken over the given texts, so to rank my text among the competitors give
 all of them together. score = sum over the terms of idf x tf x (k1 + 1) / (tf + k1 x (1 - b + b x
 length / average length)). A text without a term of the query scores 0.
 query: the query, a phrase.
 k1: how fast the score of a term saturates with its count (usually 1.2..2).
 b: how much the length of a text lowers the score, 0..1 (0: not at all).

 Example: semkit read texts.csv bm25 "угловой диван" write -
 -> Диван угловой и кресло. Купить диван недорого., 0.8806; Кресло и диван, диван кожаный., 0.2784

 The step takes each cell of the working column as a text and writes its score for the query to a
 new column <column>_bm25; to rank my text among the competitors, put all the texts in the working
 column.

╭─ Arguments ──────────────────────────────────────────────────────────────────────────────────────╮
│   QUERY      <str>  the query, a phrase. The same as --query QUERY.                              │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
│ --query          QUERY    the query, a phrase.                                                   │
│ --k1             <float>  how fast the score of a term saturates with its count (usually         │
│                           1.2..2).                                                               │
│                           [default: 1.5]                                                         │
│          -b      <float>  how much the length of a text lowers the score, 0..1 (0: not at all).  │
│                           [default: 0.75]                                                        │
│ --as             NAME     Write the result to a new column NAME and keep the working column as   │
│                           it is.                                                                 │
│ --help                    Show this message and exit.                                            │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯

