
 Usage: semkit read [IN] replace-text [OPTIONS] [PAIRS]

 The phrase changed by pairs, one after the other (a later pair works on the result of the earlier
 ones).

 by: what a pair finds:
 - "substring": every occurrence of the text, in any case and ё as е, becomes the replacement as
 given;
 - "phrase": a phrase equal to the text (case, ё and extra spaces do not count) becomes the
 replacement in the case of the phrase: lower, capitalised or upper («МОСКВА» → «САНКТ-ПЕТЕРБУРГ»);
 - "regex": each match of the pattern (cyrillic letters are word chars) becomes the replacement,
 with `\1` and `\g<name>` for the groups.
 first_only: with "regex", only the first match.

 Example: semkit read --text "купить диван" replace-text pairs.csv write -
 -> купить софа
 Example: semkit read --text "Диван" replace-text pairs.csv --by phrase write -
 -> Софа

 pairs: a file of two columns, what to find and its replacement; the first row is the header, the
 file is read like `read` does.

 The step rewrites the working column; with --as NAME it writes the result to a new column NAME.

╭─ Arguments ──────────────────────────────────────────────────────────────────────────────────────╮
│   PAIRS      <str>  a file of two columns, what to find and its replacement; the first row is    │
│                     the header, the file is read like `read` does. The same as --pairs PAIRS.    │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
│ --pairs             PAIRS                     a file of two columns, what to find and its        │
│                                               replacement; the first row is the header, the file │
│                                               is read like `read` does.                          │
│ --by                <substring|phrase|regex>  what a pair finds: - "substring": every occurrence │
│                                               of the text, in any case and ё as е, becomes the   │
│                                               replacement as given; - "phrase": a phrase equal   │
│                                               to the text (case, ё and extra spaces do not       │
│                                               count) becomes the replacement in the case of the  │
│                                               phrase: lower, capitalised or upper («МОСКВА» →    │
│                                               «САНКТ-ПЕТЕРБУРГ»); - "regex": each match of the   │
│                                               pattern (cyrillic letters are word chars) becomes  │
│                                               the replacement, with `\1` and `\g<name>` for the  │
│                                               groups.                                            │
│                                               [default: substring]                               │
│ --first-only                                  with "regex", only the first match.                │
│ --as                NAME                      Write the result to a new column NAME and keep the │
│                                               working column as it is.                           │
│ --help                                        Show this message and exit.                        │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯

