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

# wordgraph-score

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

A parse's plausibility under the word graph (`tree_score`) and the k-best reranking check (`rerank`) with λ chosen on
the other fold of a dev treebank. Epoch 2026-11-06: first version; with the 50 k graph, EWT dev LAS 0.8047 → 0.8073.

### Approximant

tree_score(T) = Σ over T's non-swap events with both ends in the graph of role_score (core: nsubj, nsubj:pass, obj,
iobj, agent) or judged value (others). rerank: per sentence the k best (parser score p_i, graph score g_i, correct
words c_i); pick(λ) = argmax p_i + λ g_i, first on ties; folds by sentence parity; λ* for fold f = the grid value with
the most correct words on fold 1−f, kept only if better than λ = 0 there.

### Invariant

λ = 0 reproduces the parser's top-1; no λ is chosen on the fold it is reported on; deterministic (parallel map
collected in order, first-max ties); the test set is never read by this code path unless given.

### Cost

One k-best parse per sentence plus O(k · events · (log N + bound)) graph lookups; EWT dev (2 001 sentences, k = 8) in
3.5 s with 4 threads (2026-11-06).

### Composition

Uses `extract` for a tree's events, `graph` for the values, `en::annotate` for the k best; called by the CLI `rerank`.

### Tests

Run on EWT dev twice with identical output (2026-11-06); no unit test of its own.

### Behavior complement

Does not train the parser, change its k-best search, flag single attachments, or use the test set; LAS counts every
word, punctuation included, with the full relation.

### Reverse reconstruction

From the report: per fold LAS (top-1, reranked, oracle), λ and the number of changed sentences; not the trees.

## Provenance

- **source SHA-256:** `61d3cfbdf6586a36…`
- **repository commit:** `f55191f0d47f`
