---
title: "wordgraph-tamp-cluster — Mova code model"
description: "Mova code model of wordgraph/tamp/src/cluster.rs: components with their labels, obernants and the model text."
url: "https://groupants.elamur.ai/free/en/mova/wordgraph/tamp/src/cluster.rs.groupant/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Research](https://md.research.elamur.ai/free/en/) · **Groupants**

This page as HTML: <https://groupants.elamur.ai/free/en/mova/wordgraph/tamp/src/cluster.rs.groupant/>

# wordgraph-tamp-cluster

The groupant beside wordgraph/tamp/src/cluster.rs in the Mova repository: what the code computes, what it never does, how to go back from its outputs, its invariants, cost and checks.

## Facts

- **kind:** groupant
- **status:** partial source bound model
- **source:** [`wordgraph/tamp/src/cluster.rs`](https://github.com/ElamurAI/mova-free/blob/main/wordgraph/tamp/src/cluster.rs)
- **repository folder:** [`wordgraph/tamp/src/cluster.rs.groupant`](https://github.com/ElamurAI/mova-free/tree/main/wordgraph/tamp/src/cluster.rs.groupant)

> **Implementation material.** A Mova code model describes this code at one source revision: partial models, finite checks and their stated scope. It is not a reviewed general exposition, and its labels are shown as written, never raised.

## Components

| component | label | where |
|---|---|---|
| **Approximant** | partial | [Approximant](#approximant) |
| **Ast** | partial | `syntax.json` |
| **Composition** | partial | [Composition](#composition) |
| **Cost** | partial | [Cost](#cost) |
| **Descriptant** | present | [Descriptant](#descriptant) |
| **Invariant** | partial | [Invariant](#invariant) |
| **Tests** | executed bounded checks | [Tests](#tests) |

## Obernants

The typed relations around the forward model: the behaviour complement (what the code never does), the reverse reconstruction (every input compatible with an output) and specialised views.

| relation | type | label | where |
|---|---|---|---|
| Behavior complement | behavior complement | partial source derived model | [Behavior complement](#behavior-complement) |
| Reverse reconstruction | reverse reconstruction | partial source derived model | [Reverse reconstruction](#reverse-reconstruction) |

## Model text


### Descriptant

Template nodes: statements with one shingle set are one set; MinHash LSH (192 hashes, 64 bands × 3 rows) proposes
pairs; exact Jaccard verifies (edge at J ≥ τ, two different papers, and the order test both ways); star clustering
in order of statement document frequency; ≥ `min_papers` papers make a cluster. Also the threshold-study pairs,
the Jaccard histogram and the largest single-linkage component.

### Approximant

P(candidate | J) = 1 − (1 − J³)⁶⁴; edges E = {(a,b) | J ≥ τ, order holds}; df(s) = |papers(s ∪ N(s))|;
star: for s by (df↓, deg↓, paper, unit): C = {s} ∪ (N(s) \ assigned) if |papers(C)| ≥ m.

### Invariant

Every member is within τ of its centre (no chaining); members are disjoint; sorted keys decide everything; outputs
do not depend on the thread count (par_map keeps order).

### Cost

O(U·K·|sh|) signatures + O(U·B log(U·B)) bucket sort + Σ bucket² candidates (1.55 M) + verification; ≈ 30 s of the
60 s build (2026-11-06).

### Composition

Called by `build::cluster_with`; uses `norm`.

### Tests

`near_repeats_across_papers_form_one_node_and_shuffles_and_chains_do_not` (shuffles and an unrelated statement stay
out — red side), `a_star_does_not_chain`. Real controls in `build::controls`.

### Behavior complement

Does not merge paraphrases below τ, does not cluster statements with < 5 content lemmas, skips buckets above 4,000
(counted), does not use frames or meaning.

### Reverse reconstruction

A node lists its member sets and units; the centre and each member's Jaccard to it are kept; the candidate pairs are
not kept.

## Provenance

- **source SHA-256:** `07f3c859ab409836…`
- **repository commit:** `9c26aadad2d4`
