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

# onto-wsd

The groupant beside onto/src/wsd.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:** [`onto/src/wsd.rs`](https://github.com/ElamurAI/mova-free/blob/main/onto/src/wsd.rs)
- **source SHA-256:** `d1909a52c54bb15a…`
- **repository folder:** [`onto/src/wsd.rs.groupant`](https://github.com/ElamurAI/mova-free/tree/main/onto/src/wsd.rs.groupant)
- **repository commit:** `855da7bd4a7b`

> **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 | `model.md` |
| **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.

| id | 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) |
| `normalization` | normalization | partial source derived model | [normalization](#normalization) |
| `score_terms` | score_terms | partial source derived model | [score_terms](#score-terms) |
| `epsilon_tie` | epsilon_tie | partial source derived model | [epsilon_tie](#epsilon-tie) |
| `prior_effect` | prior_effect | partial source derived model | [prior_effect](#prior-effect) |

## Parts

- [onto-wsd-prior-file-projection](https://md.groupants.elamur.ai/free/en/mova/onto/src/wsd.rs.groupant/prior-file-projection.groupant/)

## Model text


### descriptant

#### onto-wsd

stem lowercase/trim/possessive/suffix heuristic; content stops before/after. IDF=max(ln(N/(1+df)),0) over OEWN stems. Signature self1 neighbors.5. choose noun senses, target removal, Lesk set sorted hits/10+1.5prior+.5core+domain top3 rank votes; replace iff total>best+1e-9. build_prior corpus neighbors WUP^8, global_prior OnceLock file/error default.

##### Epoch 2026-10-31

Full source reviewed before changes; prospective predictions retained in the external wave29 receipt. Added tests preserve production behavior. stem/content, tiny missing/duplicate/malformed Prior, empty IDF executed. choose/signature/WUP/corpus/global prior paths unexecuted; no live prior read. Registration is partial modeling, not semantic proof.

### approximant

#### Forward relation

stem lowercase/trim/possessive/suffix heuristic; content stops before/after. IDF=max(ln(N/(1+df)),0) over OEWN stems. Signature self1 neighbors.5. choose noun senses, target removal, Lesk set sorted hits/10+1.5prior+.5core+domain top3 rank votes; replace iff total>best+1e-9. build_prior corpus neighbors WUP^8, global_prior OnceLock file/error default.

##### Scoped equation

Missing path→empty. ReadUTF8; skip starts#; >=4 tabfields: share[f1]=parse(f2).unwrap_or(0); neighbors.entry(f0).or_insert(f3).

Domain: finite in-memory synthetic inputs and fresh tiny temporary fixtures, valid graph/CSR/rank coordinates when graph APIs are used, sufficient resources and representable integer intermediates. Malformed-input behavior is only claimed where explicitly stated; no universal panic-freedom. External teacher, live dump, corpus and database effects were not executed.

Executable approximant gap: no useful percentage metric established for these categorical/effectful observations. No surrogate or production substitution. Future caps 1/2/5/10% require a metric/domain and evidence; no numerical error bound follows here.

### invariant

## Invariant

Prior absent empty; malformed share0, share duplicate last/neighbors first. No finite/nonnegative prior gate. Signature first40 qualifying incoming; domain repetitions count, Lesk dedups. Empty IDF0. OnceLock freezes first access.

### Cost

IDF O(gloss/member bytes); signature2 upward levels+40 in+unbounded qualifying out. choose O(senses*signature+hits log hits+context lookup). Corpus maps/top200 vectors unexecuted; recursive depth stack bound absent.

Domain: finite in-memory synthetic inputs and fresh tiny temporary fixtures, valid graph/CSR/rank coordinates when graph APIs are used, sufficient resources and representable integer intermediates. Malformed-input behavior is only claimed where explicitly stated; no universal panic-freedom. External teacher, live dump, corpus and database effects were not executed.

### composition

#### Composition

stem lowercase/trim/possessive/suffix heuristic; content stops before/after. IDF=max(ln(N/(1+df)),0) over OEWN stems. Signature self1 neighbors.5. choose noun senses, target removal, Lesk set sorted hits/10+1.5prior+.5core+domain top3 rank votes; replace iff total>best+1e-9. build_prior corpus neighbors WUP^8, global_prior OnceLock file/error default.

Fragment `prior-file-projection` covers bytes [6027,6581); its equation contributes the indicated local relation. Other source branches/effects remain in the parent model; fragment does not inherit a whole-file proof.

Actual joins: wdx::Tsv emits rank-bearing unquoted schemas read by wdgraph and wdlex; wdgraph rebuilds local indices so wdwalk/rank_kinds must remap Q IDs. wdalign source masks serialize through src_names into wdwalk::n_sources_str (all16 categories checked). Wd uses first-step P31 even for present graph nodes, whereas wdwalk::run only adds P31 for absent graph Qs: these are distinct adapters. wdwalk candidates feed coresel confirmation; wdvmm parsing does not prove truth. wsd consumes model::Graph, kb::up/ancestors, query::lookup and core::of_concept; eval scores query::Answer rather than proof correctness. build::Builder consumes Zip::read; central/local offsets and method gates are not full ZIP validation.

### models

### behavior_complement

Exclude later replacement for advantage<=1e-9. Duplicate context cannot increase Lesk but may alter domain. NaN/negative shares allowed; no universal valid-WUP claim on cyclic graphs.

### reverse_reconstruction

Choice fiber admits many texts sharing normalized stems/domain votes/scores within epsilon. Prior maps lose overridden shares and short rows; neighbor/weight may originate different records.

### normalization

running→runn,berries→berry; heuristic not morphology proof.

### score_terms

Lesk/10+1.5share+.5core+domain; masks disable independently.

### epsilon_tie

Strict >best+1e-9. A NaN challenger cannot replace; if the first candidate score is NaN, every later comparison fails and the first choice remains even against finite scores.

### prior_effect

load errors propagate, global_prior swallows and caches; build_prior tar/output unexecuted.

### tests

#### Executed checks

Native command: `cargo test --offline -p onto --bin onto -- --exact --test-threads=1 wsd::wave29_ontowiki::normalization_and_prior_collision` (add `--release` before `--` for optimized profile). These exact names were included in the inspected selected command, twice per profile. All 21 sorted named outcomes matched across four runs. This source's compiled mutant returned exit101 with a failing assertion; exact source restoration followed by its passing test.

stem/content, tiny missing/duplicate/malformed Prior, empty IDF executed. choose/signature/WUP/corpus/global prior paths unexecuted; no live prior read.

Syntax generated twice identically after restoring source. Evidence receipts: debug-1/debug-2/release-1/release-2 logs, outcomes and exit files; negative-wsd, restored-wsd, controls.json and native-commands.json in external wave29 ontowiki run.

No strict Clippy claim: inherited dependency/target warnings observed; no production logic changed, focused rustfmt applied to added test modules only.
