
 Usage: semkit read [IN] cluster-serp [OPTIONS]

 Cluster the phrases of a SERP table (columns phrase, position, url) by the common URLs of their
 tops.

 method: "soft" grows a cluster around its center: a phrase joins when it shares enough URLs with
 the center; "hard" lets a phrase join only when it shares enough URLs with every member of the
 cluster.
 common: how many URLs two phrases must share.
 top: how many first positions of each phrase count.

 One row per phrase: phrase, cluster (1 = the largest), center (the first phrase of the cluster)
 and common (URLs shared with the center; the center gets the size of its own top).

 Example: semkit read serp.csv cluster-serp write -
 -> диван купить, 1, диван купить, 3; купить диван, 1, диван купить, 3; кресло, 2, кресло, 3

 freq: a file with the phrases in its first text column and their frequencies in --freq-column; the
 file is read like `read` does.
 freq_column: the column of the frequencies in the --freq file; by default the first column of
 numbers.

 The step reads the current table, a SERP with the columns phrase, position and url; the table of
 the clusters replaces it, its column phrase is the working one.

╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
│ --method             <soft|hard>  "soft" grows a cluster around its center: a phrase joins when  │
│                                   it shares enough URLs with the center; "hard" lets a phrase    │
│                                   join only when it shares enough URLs with every member of the  │
│                                   cluster.                                                       │
│                                   [default: soft]                                                │
│ --common             <int>        how many URLs two phrases must share. [default: 3]             │
│ --top                <int>        how many first positions of each phrase count. [default: 10]   │
│ --freq               <str>        a file with the phrases in its first text column and their     │
│                                   frequencies in --freq-column; the file is read like `read`     │
│                                   does.                                                          │
│ --freq-column        <str>        the column of the frequencies in the --freq file; by default   │
│                                   the first column of numbers.                                   │
│ --help                            Show this message and exit.                                    │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯

