Elamur: **Mova** · [Parse](https://mova.elamur.ai/free/en/parse/) · [Research](https://md.research.elamur.ai/free/en/) · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/) · [Shryfti](https://md.shryfti.elamur.ai/free/en/)

[Mova](https://md.mova.elamur.ai/free/en/) · [this page in HTML](https://mova.elamur.ai/free/en/docs/languages/sh/sr/36-serbian-in-mova/)

[Mova](https://md.mova.elamur.ai/free/en/) / [docs](https://md.mova.elamur.ai/free/en/docs/) / [languages](https://md.mova.elamur.ai/free/en/docs/languages/) / [sh](https://md.mova.elamur.ai/free/en/docs/languages/sh/) / [sr](https://md.mova.elamur.ai/free/en/docs/languages/sh/sr/) / 36. Serbian in Mova

# 36. Serbian in Mova

Serbian parsing in Mova requires language identification for Serbian text and a Serbian Universal Dependencies (UD) model. The language assigned to a span determines which model the parser selects. An annotated corpus supplies training data and held-out reference trees for evaluation. The grammar manual records rules and patterns that Squid can turn into claims for implementation.

## Language identification for Serbian text in Cyrillic and Latin

The multilingual pipeline assigns a language to each sentence and span before selecting a parser model. Model selection uses the span label. A sentence can contain spans in different languages, including spans written in the same script.

Serbian can be written in Cyrillic or Latin. The two rows below express the same sentence. The Latin spelling gives the romanization of the Cyrillic row. Here Cyrillic `њ` corresponds to the Latin digraph `nj` in `knjigu`.

| Script | Form | Romanization | Gloss | Translation |
| --- | --- | --- | --- | --- |
| Cyrillic | Мила чита књигу. | Mila čita knjigu. | Mila.NOM read.PRS.3SG book.ACC.SG | ‘Mila is reading a book.’ (constructed) |
| Latin | Mila čita knjigu. | — | Mila.NOM read.PRS.3SG book.ACC.SG | ‘Mila is reading a book.’ (constructed) |

Mova’s language identifier has separate recognition for English and French in Latin script, for Hebrew-script varieties, and for Hebrew and Aramaic in scholarly transliteration. Scripts outside its supported inventory receive `other`. Serbian Cyrillic therefore falls under `other`. The Latin classifier uses a Latin character table, a lexicon for each supported language and a character four-gram model. Its Latin language inventory lacks a Serbian entry, so recognizing a Serbian span as Latin cannot yield `sr`.

Adding a Latin-script language to identification requires a lexicon and a `Lang` code. The lexicon can be built from an open UD training split with `langseg latin-lexicon`. This route concerns Latin-script identification. A coverage test needs Serbian examples in both scripts and an expected language label for each tested span. The two spellings above can test the same sentence in each script. In a multilingual example, also record the expected boundaries, since a correct sentence label alone leaves span selection untested.

## Model availability and unannotated parser output

At level 2, `tools/mova-parse` selects the model associated with the language assigned to the span. The available model files are `en.bin` for English and `fr.bin` for French. The package lacks a level-2 model for `sr`. Even with an `sr` span label, the parser would have no corresponding model to load. If the assigned label selects an available model, that selection establishes which model was used. A Serbian evaluation still needs to check whether the assigned label matches the text.

For a span whose assigned language has no model file, the `# parse` comment reports the missing model for that language. The following column values describe the resulting unannotated token rows.

| Column | Value | Annotation left unavailable |
| --- | --- | --- |
| LEMMA | `_` | Lemma |
| UPOS | `_` | Universal part of speech |
| XPOS | `_` | Language-specific part-of-speech tag |
| FEATS | `_` | Morphological features |
| HEAD | `_` | Index of the syntactic head |
| DEPREL | `_` | Dependency relation to the head |
| MISC | `Parse=None` | Dependency parse |

The underscores stand for unavailable annotations in these rows. An underscore in HEAD leaves the head unspecified. An annotated root has HEAD `0` and DEPREL `root`. `Parse=None` marks the absence of a parse. The token rows record the boundaries used for output. Assessing those boundaries against Serbian tokenization requires a Serbian reference.

## Corpus availability and the unmeasured Serbian baseline

Mova holds no annotated Serbian corpus and reports no Serbian treebank baseline or attachment scores. These statements concern Mova’s data and evaluation. An external treebank is a separate resource.

A UD treebank for the baseline needs a training split with annotated words, tags and dependencies and a development split with reference trees against which to evaluate predictions. Keep development sentences out of the training data, including duplicate copies or versions of the same sentences in the other script if the corpus contains them. A baseline report identifies the treebank, its release and the splits used. If a split represents one script or a limited range of text types, its score describes that sample. To report performance on both scripts, use reference data in both and identify the script coverage of the scored material. A result on transliterated examples describes the converted sample, whose source and conversion remain relevant to interpretation.

A lexicon extracted for language identification provides word forms. Parser evaluation requires reference heads and dependency relations as well as predictions. Missing-model output with `Parse=None` lacks a predicted tree and cannot serve as reference annotation.

## Training and evaluating a UD parser baseline

The package specifies the same baseline procedure for each language. Start with the language’s UD training split and apply `en xpos-fill` before running `en train`. The `en` crate trains a tagger and tree parser on the training data. Then use `en parse-eval` to measure attachment on the development split. The Serbian baseline requires Serbian training and development data and a Serbian model produced by the training step.

UAS and LAS are proportions of the words scored by the evaluator. For each measure, the numerator counts the words that meet its criterion.

| Measure | A scored word counts as correct when |
| --- | --- |
| Unlabeled attachment score (UAS) | Its predicted head matches the reference head. |
| Labeled attachment score (LAS) | Its predicted head and dependency relation both match the reference annotation. |

For example, in *Mila čita knjigu* above, suppose the reference attaches *knjigu* to *čita* as `obj`. A prediction that attaches it to *čita* as `obl` earns credit for UAS only. A prediction that attaches it to *Mila* as `obj` earns credit for neither measure. Attachment scores measure dependency attachment. Lemmatization, tagging, language identification and speech-act interpretation require their own evaluation.

Report the treebank release, the splits and any preprocessing alongside UAS and LAS. State whether the evaluation uses reference or predicted word boundaries and which input annotations, such as tags, are supplied. Report the evaluator’s conventions for which words count, including punctuation and how predicted and reference words are matched if their boundaries differ. A run on an identified Serbian development split measures the parser under those input conditions. End-to-end evaluation needs to account for upstream language identification and for spans that receive no parse. The package specifies the training and development procedure. No Serbian run has supplied a result for it.

## Dependency trees as input to frames and pragmatics

A dependency tree identifies heads and grammatical relations. In the constructed reading example above, a UD analysis can make *čita* the clause head, attach *Mila* as `nsubj` and attach *knjigu* as `obj`. Those attachments give an interpretation component evidence for associating Mila with the reader role and the book with what is read. The relations describe grammatical functions. Mapping them to roles depends on the predicate and its construction.

Pragmatic analysis needs further evidence. The same sentence can answer *Šta Mila radi?* ‘What is Mila doing?’ or explain why Mila is unavailable, depending on the preceding discourse (constructed). Its subject and object attachments can stay the same in both uses. The identity of the book can also depend on context. Attachment evaluation therefore measures an earlier stage of analysis than frame or pragmatic evaluation.

Mova’s downstream components are described for English trees. A Serbian model would supply Serbian dependency trees. Downstream support would also require mapping the Serbian predicate and its construction to the intended frame, then checking that the resulting interpretation works in context.

## Grammar claims and the Squid queue

Squid reads the manual and represents each grammatical point as a claim. It queues formalizable claims, including rules, closed lists and statistics, for implementation in Mova. A rule claim specifies its domain, conditions, result and exceptions. A closed-list claim gives the complete membership of the list under the stated conditions. A statistical claim specifies what is counted and the population or sample to which the count applies. A rate also requires a denominator.

For Serbian, the first claims relevant to implementation concern tokenization, tagging and dependency annotation for a UD treebank baseline. Tokenization claims specify surface token boundaries and, where needed, how those tokens correspond to syntactic words. Tagging claims specify categories and features in context. Dependency claims specify the head and relation assigned by the annotation. For example, in *Mila je čitala knjigu.* ‘Mila was reading a book.’ (constructed), *je* is a separate word, can be tagged `AUX` in this use and can attach to *čitala* as `aux`. The example gives a boundary, a tag and an attachment that can be checked separately. A rule based on it needs to specify the auxiliary use, since the spelling *je* also occurs as an object pronoun, as in *Mila je vidi.* ‘Mila sees her.’ (constructed).

A claim’s presence in the queue records a point that can be formalized. Implementation requires a corresponding place in code. A grammar example illustrates the claim. Evidence of parser behavior comes from parser output, and a measured statistic requires a defined sample and evaluation procedure.

## How Mova handles Serbian today

`tools/mova-parse` uses `tools/langseg` at level 1 to assign a language to each sentence and span. The identifier distinguishes English and French in Latin script, Hebrew-script varieties, and Hebrew and Aramaic in scholarly transliteration. Other scripts receive `other`, which covers Serbian Cyrillic. The supported Latin-script language inventory lacks a Serbian entry.

Level 2 selects a model by the assigned span language. The `en` crate has trained models for English and French, `en.bin` and `fr.bin`. Mova lacks an `sr` model. For a span whose assigned language has no model, `tools/mova-parse` reports the missing model in the `# parse` comment, puts `_` in LEMMA, UPOS, XPOS, FEATS, HEAD and DEPREL, and puts `Parse=None` in MISC. The fallback can emit token rows. Mova lacks Serbian-specific tokenization, tagging, lemmatization and dependency parsing at this stage.

Mova holds no annotated Serbian corpus and reports no Serbian treebank baseline. The baseline procedure in [What every language gets](https://md.mova.elamur.ai/free/en/docs/languages/PACKAGE/) uses `en xpos-fill` before `en train` on the UD training split and `en parse-eval` for UAS and LAS on development data. The downstream components `prag` and `world` read English trees and receive no Serbian trees from this pipeline.

Squid reads the Serbian manual as claims and queues those that can be formalized.

## Sources for this chapter

- [What every language gets](https://md.mova.elamur.ai/free/en/docs/languages/PACKAGE/) specifies the parser baseline procedure described in this chapter.
- The Serbian example sentences are constructed for this chapter. See [Sources](https://md.mova.elamur.ai/free/en/docs/languages/sh/sr/sources/) for sources used to check grammatical claims.
- [← previous 35. Register and style](https://md.mova.elamur.ai/free/en/docs/languages/sh/sr/35-register-and-style/)
- [next → Sources](https://md.mova.elamur.ai/free/en/docs/languages/sh/sr/sources/)
- [↑ back to Serbian (sr) — a reference manual for Mova](https://md.mova.elamur.ai/free/en/docs/languages/sh/sr/)

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://mova.elamur.ai/sitemap.xml) · [llms.txt](https://mova.elamur.ai/llms.txt)
