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

This page as HTML: <https://groupants.elamur.ai/free/en/mova/tools/langseg/src/variety.rs.groupant/>

# langseg-variety

The groupant beside tools/langseg/src/variety.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:** [`tools/langseg/src/variety.rs`](https://github.com/ElamurAI/mova-free/blob/main/tools/langseg/src/variety.rs)
- **repository folder:** [`tools/langseg/src/variety.rs.groupant`](https://github.com/ElamurAI/mova-free/tree/main/tools/langseg/src/variety.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` |
| **Cost** | symbolic source derived | [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) |
| Vote abstention | vote abstention | partial source derived model | [Vote abstention](#vote-abstention) |

## Model text


### Descriptant

The dialect modifier of a label (language, dialect, style): marker word forms and phrases with votes per national
variety (English US/GB/CA, French FR/CA/BE/CH), summed over a sentence or a document; a decision needs a marker and a
lead of one vote. Also the `StyleTagger` interface for the separate style field.

### Approximant

`votes(L, words) = Σ_{m ∈ markers(L) found} v_m`; `decide = argmax_d votes_d` if some marker fired and
`votes_(1) − votes_(2) ≥ 1`, with confidence `lead/(lead+1)`; otherwise unknown.

### Invariant

Votes are additive (`Votes::add` of two sentences equals the votes of their concatenation for single-word markers);
an unknown language has no dialects; markers are matched on lower-cased, apostrophe-normalised words; ties keep the
earlier dialect in the table order only when a lead ≥ 1 exists, otherwise abstain.

### Cost

`O(W · S)` prefix checks for English stems, `O(W · P)` window matches for French phrases.

### Behavior complement

No pronunciation, grammar or typography cues; no learned weights; no style detection; regional varieties outside the
table (Australia, Ireland, India, Africa) are not labelled (British spelling reads GB or GB/CA-tied unknown).

### Reverse reconstruction

A label recovers only a set of marker multisets whose vote vector has that argmax and lead; the marker list in the
output recovers which markers fired, not how often (the `Votes` map keeps counts).

### Vote abstention

`-our/-re` alone ties GB and CA, so the answer is unknown until *-ise* or *-ize* or a word marker breaks the tie;
measured on Europarl English (2026-11-06): GB in 188 of 2 996 sentences, US in none.

### Tests

`markers_decide_or_abstain` (GB, US, CA, CH, CA phrase, abstentions, the *laboratory* false-prefix control).

## Provenance

- **source SHA-256:** `36db9e9cc5bb5e97…`
- **repository commit:** `2e25d7bfae9a`
