Mova0.5 pre-release⌕
☰
home / docs / kg — the Mova knowledge graph

kg — the Mova knowledge graph

Why

The graph is a tool, not a goal. The path from a request to an answer is:

text/prompt ─► deterministic parser (dictionaries + grammar) ─► commands for Rust code
            └─(not parsed)─► AI rewrites it into a structured request (simple sentences) ─► parser
commands ─► descriptive and result graphs in memory ─► deterministic text generator (Rust,
          no neural nets: Markov, "not-too-slow algorithms") ─► text for the user
                                                   └─(or)─► graph into an AI prompt ─► polished text

A domain parser and generator need dictionaries, grammars and research papers (source dossiers). Requirements for the graph: density and speed (SIMD, matrices, quantization, compression on SSD); flags so that a task can cut out a subgraph instead of walking the whole graph, and quality can be evaluated on compressed subgraphs.

The unit of knowledge is a simple sentence

One grammatical core (predicate + subject) yields one fact: a fact vertex and edges from it to the sentence members:

The service edge from_sentence points to the source sentence.

A fact is a vertex rather than a single edge. This way sentences without an object and sentences with adverbials fit without loss. The roles are syntactic, i.e. derived from case, agreement and government. Semantic roles come as the next layer.

Relation labels are English; the case in object:<case> and adverbial:<preposition>+<case> is the VESUM tag (v_zna, v_mis, …), and the preposition and quantity word are the Ukrainian words themselves (needed to restore the sentence).

Identifiers

u64 = heap (high 32 bits) | number within the heap (low 32).

Heap rangePurpose
[1, 2^26)service: rel (relations) …
[2^26, 2^27)local
[2^27, 2^32)global: word:uk (lemma|part_of_speech), sentence:tatoeba, fact:tatoeba:uk

Numbers are consecutive from 1. Key → number lives in keys/<heap>.tsv and is append-only, so ids are stable across runs.

Edge and grammar

An edge has the fields src u64, dst u64, rel u32, gs u32, gd u32, flags u32.

gs and gd are the compact grammar of the edge's ends in 4 bytes (src/gram.rs):

FieldBits
part of speech5
case3
number2
gender2
person2
tense/form3
aspect2
animacy2
degree2
flags: pronoun, proper name, negation, implicit member1 each

gs is the grammar of the fact (the predicate), gd is the grammar of the member. The word form is not stored: it is restored from the lemma and gd via VESUM.

Edge flags (src/cols.rs, flag::*):

GroupValues
sourcetatoeba, manual
languageuk, en
layerfact, prov, translation
checkchecked

A subgraph is a mask filter over the flags column: kg sub <store> uk,fact,checked <out>.

Storage

Status (2026-09-24), Tatoeba uk

kg tatoeba-uk $MOVA_DATA/raw/multi-tatoeba …/uk-vesum-dict-uk/dict_corp_vis.txt.bz2 $MOVA_DATA/kg

Run:

MetricValue
sentences188,811
parsed as a simple sentence55,716 (29.5%)
edges245,300
size on disk3.65 B/edge (raw columns — 32 B; ×8.8 compression)
run time14 s, of which 11.6 s is VESUM
subgraph uk,fact,checked189,584 edges, filter 1.9 ms

Rejections: commas, questions, conjunctions, an infinitive after the predicate, a dash with a verb — these are not yet simple sentences. Ambiguous cases are not guessed.

Quality — manual evaluation:

Checks:

Commands

kg tatoeba-uk <tatoeba-dir> <vesum.bz2> <store>
kg show <store> <tatoeba-id>...
kg stats <store>
kg sub <store> <flags> <out>
kg parse <vesum.bz2> <store> <in.tsv> <out.tsv>

For domain projects

Mova is the language backbone for domain projects. They read the databases, knowledge and code and build their own domain versions.

The first application is document expansion for RAG: a deterministic step instead of expensive AI steps, with AI kept as the fallback path.

Rules:

Generator (graph → sentence)

src/textgen.rs:

Round-trip gate on the held-out 10% (5,488 facts): verbatim 68.8%, same words in a different order 28.5%, different words 2.6%.

Next

  1. AI fallback path. A pilot on a small sample of rejections (commas, conjunctions): Opus rewrites the sentence into simple ones, the parser parses them. Measure the share parsed and meaning preservation. A mass run only with explicit approval.
  2. English: translations from Tatoeba links → translation edges; an English parser (morphology from open dictionaries).
  3. Broader constructions: coordinated members, questions, complex sentences.

Licence

Elamur Cosmic License (Elamur Cosmic License). Third-party data keeps its own terms, as noted where it is used.

This page in Markdown → https://md.mova.elamur.ai/free/en/docs/kg/