---
title: "wordgraph-tamp-synonym — Mova code model"
description: "Mova code model of wordgraph/tamp/src/synonym.rs: components with their labels, obernants and the model text."
url: "https://groupants.elamur.ai/free/en/mova/wordgraph/tamp/src/synonym.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/synonym.rs.groupant/>

# wordgraph-tamp-synonym

The groupant beside wordgraph/tamp/src/synonym.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/synonym.rs`](https://github.com/ElamurAI/mova-free/blob/main/wordgraph/tamp/src/synonym.rs)
- **repository folder:** [`wordgraph/tamp/src/synonym.rs.groupant`](https://github.com/ElamurAI/mova-free/tree/main/wordgraph/tamp/src/synonym.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

Synonym classes for matching: WordNet first-sense synonyms (same part of speech, both in the corpus vocabulary)
confirmed by the word graph — cosine of typed neighbour profiles (direction, relation, neighbour word; PMI) ≥
`min_cos` — and British/American spelling variants without the graph; union-find, smallest id represents.

### Approximant

classes(V, G, θ) = UF{(w,v) | v ∈ syn₁(w) ∩ V, pos(v)=pos(w), cos(prof_G(w), prof_G(v)) ≥ θ} ∪ {(w,v) | v ∈ spell(w) ∩ V}.

### Invariant

The map changes only ids in a class of ≥ 2; a representative is the class minimum; pairs are found once
(unordered key); without a graph no WordNet pair is used.

### Cost

|V| WordNet lookups; per proposed pair two profile reads (≤ 2·k per relation group). 628 pairs on 1,763 papers.

### Composition

Called by `build::synonyms`; reads `world::wordnet`, `wordgraph::Graph`.

### Tests

`spelling_variants_go_both_ways`, `spelling_classes_take_the_smallest_id_and_wordnet_needs_the_graph` (no graph:
no WordNet pair — the red side). Hand check 2026-11-06: 13 of 16 sampled pairs synonymous in context.

### Behavior complement

No other senses than the first, no multiword synonyms, no hypernyms, no antonym detection beyond the graph check.

### Reverse reconstruction

The pairs list (`synonyms.json`) records each fold with its cosine and source; the original id of a folded lemma is
recoverable from the statement's words, not from its sequence.

## Provenance

- **source SHA-256:** `9638cf60716dd2db…`
- **repository commit:** `9c26aadad2d4`
