---
title: "BENCHić-lang — paper by Rupnik et al. (2023)"
description: "BENCHić-lang tests how well news, social media and national web data help distinguish Bosnian, Croatian, Montenegrin and Serbian across…"
canonical: "https://research.elamur.ai/free/en/papers/rupnik-2023-benchic-lang-benchmark-discriminating-between/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [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/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/rupnik-2023-benchic-lang-benchmark-discriminating-between/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2023](https://md.research.elamur.ai/free/en/papers/2023/) / BENCHić-lang: A Benchmark for Discriminating between Bosnian, Croatian, Montenegrin and Serbian

# BENCHić-lang: A Benchmark for Discriminating between Bosnian, Croatian, Montenegrin and Serbian

Paper · 2023 · Peter Rupnik, Taja Kuzman and Nikola Ljubešić

**Authors:** [Peter Rupnik](https://md.research.elamur.ai/free/en/authors/peter-rupnik/), [Taja Kuzman](https://md.research.elamur.ai/free/en/authors/taja-kuzman/) and [Nikola Ljubešić](https://md.research.elamur.ai/free/en/authors/nikola-ljubesic/) · **Year:** 2023 · **Venue:** Tenth Workshop on NLP for Similar Languages, Varieties and Dialects (VarDial 2023) · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

[Cited by **11** papers in our library of the 163,136 papers whose bibliographies we read](https://md.research.elamur.ai/free/en/papers/rupnik-2023-benchic-lang-benchmark-discriminating-between/cited-by/) · Tenth Workshop on NLP for Similar Languages, Varieties and Dialects (VarDial 2023) · [licence](https://creativecommons.org/licenses/by/4.0/)

- [Publisher's page](https://aclanthology.org/2023.vardial-1.11/)
- [PDF](https://aclanthology.org/2023.vardial-1.11.pdf)
- [DOI 10.18653/v1/2023.vardial-1.11](https://doi.org/10.18653/v1/2023.vardial-1.11)

## Summary

A classifier can learn to tell closely related languages apart in a collection of news articles and still struggle when it reads social media. BENCHić-lang makes that change of source part of the test. The paper brings together parallel news articles in Bosnian, Croatian and Serbian from the South-Eastern Times, known as SETimes, and collections of tweets from users labeled with those languages or Montenegrin. A news prediction applies to an article. A Twitter prediction applies to a collection of posts by a user. By testing on a different collection from the one used for training, the authors ask how much of what a classifier learns travels with the language.

The baseline uses a linear support vector machine, or SVM, trained on short sequences of characters. On the SETimes test split, the news-trained baseline reaches 0.995 on both micro F1 and macro F1, the benchmark’s measures of performance across predictions and across languages, respectively. The Twitter-trained baseline scores 0.839 micro F1 and 0.672 macro F1 on that same test split. Transfer in the other direction also falls short of training on the target collection. On the Twitter test split restricted to the languages shared with SETimes, the news-trained baseline reaches 0.743 micro F1 and 0.747 macro F1.

The authors try a different source of training evidence. They use national web domains as approximate language labels and compare how characteristic individual words are of one domain’s texts relative to another’s. The comparisons yield 819 distinct words. A Naive Bayes classifier learns from their presence in web documents. On the SETimes test split it reaches 0.957 on both F1 measures. On the restricted Twitter test split it reaches 0.946 micro F1 and 0.897 macro F1, ahead of both SVM baselines there. The web approach thus improves on direct transfer between the benchmark collections, although the news-trained SVM retains the highest SETimes scores.

Montenegrin exposes the limits of that result. On the full Twitter test split, the web classifier and the Twitter-trained SVM both record 0.870 micro F1, but they correctly identify only one and 4 of the 11 Montenegrin instances, respectively. A strong pooled score can therefore coexist with poor identification of a particular language. The paper also cautions that national domains provide imperfect labels and that distinctions between their vocabularies can reflect what people write about as well as how they write. The benchmark gives evidence about portability across its news and Twitter collections while leaving the broader problem of identifying all the languages open.

## Deep dive: BENCHić-lang: A Benchmark for Discriminating between Bosnian, Croatian, Montenegrin and Serbian

BENCHić-lang tests how well news, social media and national web data help distinguish Bosnian, Croatian, Montenegrin and Serbian across sources. · about 31 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### What changes when the source changes

The task begins with a tension. Bosnian, Croatian, Montenegrin and Serbian are mutually intelligible, and the authors also point to documented differences among them. For [text classification](https://md.research.elamur.ai/free/en/concepts/text-classification/), that combination matters. A system receives a piece of writing and has to find evidence for a specific label in material that may be readily understood across the categories. The question is whether the distinctions it learns still help when the texts come from somewhere else.

A collection assembled for this purpose necessarily gives a system several kinds of evidence at once. Its texts have a language label, a source and a subject. Depending on how the collection was made, the label may regularly coincide with a topic, a style of writing or a pattern of publication. A successful classifier can benefit from all of these associations in a test drawn from the same source. A test drawn from a different source may preserve some associations and alter others. The value of the transfer experiment is that it asks for a correct prediction under that changed combination of cues.

The paper places the label inventory in a historical and social context. It describes the status of the languages as a subject of discussion, with questions of identity and historical convergence and divergence relevant to how the categories are understood. Each language has official standing in the corresponding country, and each country has its own national Internet domain. Those facts make labeled datasets and domain-based training feasible. They also explain why some inferences need care. A country, the website on which a text appears and the linguistic features of the text refer to different things, even when they frequently align.

Mutual intelligibility gives this problem its particular shape. An isolated word can occur naturally across several of the categories, and a useful clue can consist of a difference in how often a form appears. The classifier can therefore work with relative tendencies. Such a tendency may be visible in one collection, but reliability in another collection depends on whether the tendency is reproduced there and on what other evidence accompanies it. The paper evaluates the combined effect of those tendencies through predictions on held-out texts.

The evaluation question goes beyond whether a system can outperform another one on a fixed split. A fixed split can establish how well a system predicts new examples from that collection. A cross-dataset split asks a second question about what happens when the distribution of examples changes. Both are useful, and BENCHić-lang keeps room for both. Its emphasis is on transfer because the authors want the classifier to serve downstream uses where the next collection may have a different origin.

#### How the benchmark grew out of shared tasks

VarDial had already made these languages part of its work on similar languages, varieties and dialects. SETimes supplied material for the DSL corpus collection used in the 2014 shared task. It remained in the following iteration. The form used in those tasks had 22,000 instances per language, with a limit of 100 tokens per instance. BENCHić-lang returns to the underlying publication and makes whole documents available. That changes the unit on which a decision is made and lets the split keep different versions of the same content together. [A Report on the DSL Shared Task 2014](https://md.research.elamur.ai/free/en/papers/zampieri-2014-report-dsl-shared-task/) · [Overview of the DSL Shared Task 2015](https://md.research.elamur.ai/free/en/papers/zampieri-2015-overview-dsl-shared-task/)

The Twitter material also had a history in the shared tasks. A smaller version had served as out-of-domain test data in the third DSL task. BENCHić-lang expands that material and gives it separate training, development and test portions. Twitter can consequently serve as a source of supervised training as well as a destination for systems trained elsewhere. That change makes it possible to study transfer in both directions between the benchmark collections for their shared languages. [The Third DSL Shared Task report](https://md.research.elamur.ai/free/en/papers/malmasi-2016-discriminating-between-similar-languages/)

The choice of baseline also comes from the earlier evaluations. The authors cite previous work in which linear SVMs using sequences of characters competed well with more elaborate approaches. Their baseline puts that established technique under the transfer test. A useful comparison requires a method that can take advantage of the training data in familiar conditions, since a weak result everywhere would teach little about how performance changes when the source changes. [Findings of the VarDial Evaluation Campaign 2017](https://md.research.elamur.ai/free/en/papers/zampieri-2017-findings-vardial-evaluation-campaign/)

Previous experiments also motivated testing on a separate collection in the first place. The paper describes out-of-domain evaluation as particularly relevant to distinguishing similar languages. Success depends on subtle evidence, some of which can be bound up with the setting in which the texts were collected. Giving a researcher a labeled training split, a development split for choices and a held-out test split in each collection makes it possible to distinguish the role of source from the ordinary question of predicting unseen examples.

The two collections make different contributions to that design. SETimes offers versions of the same news content across its languages. That gives a classifier opportunities to encounter language differences while the underlying subject remains comparable. Twitter supplies writing from a different setting and includes Montenegrin. It also supplies a less even distribution of labels and keeps posts in other languages within a user’s collection. Transfer between the two therefore tests a practical combination of changes. The design leaves individual causes of the transfer difficulty to further analysis.

### The method, step by step

#### Decide what receives a label

BENCHić-lang begins by defining the example that a system must classify. In SETimes the example is a whole document. On Twitter the data are organized around users, and the authors combine each user’s collected tweets into a single input. Both choices allow a prediction to draw on many passages of text. They lead to different interpretations of a correct answer. In SETimes it means selecting the labeled language of an article. On Twitter it means recovering the language label assigned to the user from the assembled record of posts.

The SETimes material comes from the South-Eastern Times website and contains parallel content in Bosnian, Croatian and Serbian. Here *parallel* means that versions in different languages convey the same underlying content. The authors publish 9,258 full documents and divide them into training, development and test subsets in an 8:1:1 ratio. Their grouping rule keeps versions of the same content within a single subset. Otherwise, a system might see a close counterpart of a test article during training, an especially important concern when the languages are mutually intelligible.

The grouping rule preserves a useful property of the corpus. A difference that appears across versions of a story need not reflect a difference in the stories covered, because the versions are related. The authors see that as an opportunity to learn what differentiates the languages. The design makes the text categories comparable in content while keeping each group of parallel versions on one side of the split. The median document length is 627 words, and the arithmetic mean is 849 words. The median describes the midpoint in the distribution of lengths, while the mean is the average across documents.

For Twitter, the starting material is a collection harvested with TweetCat. The unit of sampling and splitting is the user. The released dataset has 614 users, of whom 394 carry the Serbian label, 89 the Croatian label, 75 the Bosnian label and 56 the Montenegrin label. Each user contributes at least 200 tweets. The JSON release retains a user’s label and the list of tweets, while the paper’s classifiers work on the concatenated text. A user’s posts remain together when the collection is split.

The language label belongs to the whole record. The authors deliberately keep individual tweets without filtering them by language, so a record can include occasional posts in [English](https://md.research.elamur.ai/free/en/topics/english/) or another language. The resulting task allows the classifier to look for the characteristic evidence spread across a user’s writing in the presence of some unrelated text. The paper reports a median assembled length of 5,438 words and an arithmetic mean of 7,257 words. The user-level split follows a 3:1:1 ratio so that the development and test portions contain enough material for evaluation.

These definitions also explain why a long user record can still be a difficult example. Its length provides more chances for cues associated with the label to occur. It can also bring together more varied subject matter and words from other languages. An article, by comparison, groups its text around the content it covers. The benchmark’s two sources differ in what a length of text represents, alongside their differences in writing setting and label balance.

#### Separate training, development and testing

A benchmark training split supplies the examples from which a supervised classifier estimates its decision rule. The development data supply evidence for choices such as which classifier to use or which features to retain. The test split is where the resulting choice is scored. BENCHić-lang allows training from either benchmark collection or from external data. Its rule for external material is that the training texts must avoid overlap with the test texts. Results may be submitted through the benchmark’s GitHub repository, which the paper names as the venue for adding systems.

An in-dataset run draws training and test examples from different splits of the same collection. A cross-dataset run pairs a training split from one collection with the test split of the other. The distinction becomes concrete in the SVM experiments. A system trained on SETimes can be tested on held-out SETimes articles or on held-out Twitter users. A system trained on Twitter can be tested on held-out Twitter users or on SETimes articles. To compare these directions on a common label inventory, the authors retain only Bosnian, Croatian and Serbian in the Twitter data used for that comparison.

The web system adds a separate training source. It derives its candidate vocabulary and estimates its classifier from national web corpora, then uses benchmark development data to guide choices and benchmark test data to measure performance. That distinction is important for interpreting the resulting scores. The web system learns its text features and classifier parameters from outside the benchmark training splits. Its design choices still receive feedback from the domains on which the authors want it to work.

Both F1 measures are official outcomes of the benchmark and have equal standing in its design. F1 combines precision, which asks how frequently a prediction of a label is correct, with recall, which asks how many of the examples belonging to that label the system retrieves. Micro F1 pools decisions before combining precision and recall, giving more influence to languages represented by more examples. Macro F1 gives each language the same weight by averaging its individual F1 score with those of the other languages. Keeping both measures makes it possible to see when the overall rate of successful decisions and the results across languages tell different stories.

#### Establish a character-based baseline

The baseline looks for evidence in character sequences. An [n-gram](https://md.research.elamur.ai/free/en/concepts/n-gram/) is a consecutive sequence of elements from a text. In a character n-gram, those elements are characters, so the system can learn recurring pieces of words as well as character patterns that make sense without an explicit word analysis. The baseline ultimately uses character 3-grams. This representation gives the classifier a large collection of potential cues with which to distinguish the labeled examples.

A linear support vector machine scores an input from its features using learned weights. The features describe the text, and the weights let the system place more emphasis on the character sequences that helped separate the training examples. The implementation uses scikit-learn. For this baseline, the authors compare the SVM with Naive Bayes while holding the character 3-gram representation fixed. The SVM does better in that development comparison, so the authors keep it for the baseline.

They then compare a representation limited to character 3-grams with one that also uses the longer sequences in the 3–5-gram range. The minimum sequence length remains 3. The comparison matters because the longer sequences give the classifier more specific text patterns to learn. A short sequence can recur in a wider range of words and contexts, while a longer sequence can identify a narrower pattern. The development results favor the short representation for transfer, the evaluation setting the authors prioritize.

The baseline learns directly from benchmark labels. Its evidence consists of the character patterns in whichever collection supplies the training examples. This makes the transfer results interpretable. When the training source changes, the classifier can assign different importance to the same character evidence, and it can encounter some patterns far more often than others. Comparing the resulting system on both test sources reveals how well the patterns learned from its own collection carry over.

#### Use national domains to label web texts

The authors’ alternative begins with web corpora available through BERTić-data. The corpora were gathered from the national domains .ba, .hr, .me and .rs, which the method associates with Bosnian, Croatian, Montenegrin and Serbian, respectively. A document from a domain receives the corresponding language label automatically. This is weak supervision. The source of the document supplies an approximate label, which can be used at scale and can disagree with the language of an individual text.

The authors use one portion of the web material to decide which words will become features and another to estimate the classifier with those features. Selecting a vocabulary answers a question about what the system can observe. Estimating the classifier answers a question about how the presence of those words relates to each label. Separating those steps also makes it meaningful to vary the amount of data used for the second step while holding the feature selection procedure in place.

The feature extraction corpora are large. Their reported word totals are 18,503,316 for Bosnian, 17,536,075 for Croatian, 35,684,637 for Montenegrin and 17,954,495 for Serbian. These are the totals for the source material used to rank words. The classifier training portion is a separate collection of 100,000 documents for each national domain. The paper’s corpus accounting gives paragraph and word totals for both portions, while the training discussion specifies the amount sampled at the document level.

That division is central to the web approach. A large source vocabulary can be searched for distinctions, and the classifier can still operate on a compact representation after the search. The small number of features describes what the trained system reads from a document. It says something different from the size of the corpus used to find those features or the amount of material used to learn their association with the labels.

From national web domains to benchmark predictions The steps in order.

#### Find words that distinguish one corpus from another

The search considers words made entirely of letters and at least three characters long. For each pair of web corpora, the authors look for words especially characteristic of one corpus relative to the other. The comparison is directional. When Croatian is the target and Bosnian the comparison, the ranking favors words characteristic of the Croatian corpus in that comparison. Reversing the order asks which words are characteristic of the Bosnian corpus relative to the Croatian one. A word can score well in more than one comparison.

The paper describes the weighting function as an odds ratio. Written in terms of estimated occurrence probabilities, the comparison is as follows.

```
OR(w; A, B) = [p_A(w) / (1 − p_A(w))] / [p_B(w) / (1 − p_B(w))]
```

Here `w` is a candidate word, `A` is the target corpus for the ordered comparison and `B` is the comparison corpus. `p_A(w)` and `p_B(w)` are the estimated probabilities of an occurrence of `w` in the respective corpora. In each bracket, `1` represents total probability and the subtraction gives the probability of an outcome other than `w`. Dividing the occurrence probability by that complementary probability gives the odds, and dividing the odds for `A` by those for `B` gives `OR(w; A, B)`. A larger value favors the word as a feature for `A` in this comparison. The paper gives the weighting principle and candidate criteria, leaving implementation details such as the handling of zero counts unspecified in its method description.

Ranking the corpora in pairs determines which distinctions the vocabulary can preserve. A word may be especially helpful when separating a particular pair, even if it is less informative when comparing the target corpus with another one. Giving each ordered comparison space in the feature selection lets that word enter through the pair for which it matters. It also allows an especially characteristic word to appear on several lists. At the union step, all those occurrences still contribute just one coordinate to the representation.

The authors use development results from SETimes and Twitter to choose the number of words to keep. Around 100 words per ordered pair worked best in their experiments. For the reported approach they take 100 from each of 12 lists and combine them, producing 819 distinct features. A language pair determines how a word enters this shared vocabulary. During classifier training, the word can supply evidence for whichever labels its document-level distribution supports.

#### Represent documents and learn from the web labels

The authors turn the selected vocabulary into document vectors with scikit-learn’s CountVectorizer. A vector has a position for each selected word. The [tokenization](https://md.research.elamur.ai/free/en/concepts/tokenization/) and vocabulary representation reduce a text to evidence about which of the selected forms it contains. In the final system, the value at a position records presence or absence. Once a word has appeared in a document, further occurrences leave that position unchanged.

The paper compares that binary encoding with raw frequency and [TF-IDF](https://md.research.elamur.ai/free/en/concepts/tf-idf/). Frequency preserves how often the word occurs in the document. TF-IDF also accounts for how widely the term occurs across the collection. Binary values performed best most consistently in the authors’ development trials. That choice defines a particular kind of evidence for the web classifier. It sees that a form occurred somewhere in a record, regardless of whether it appeared once in passing or repeatedly in a sustained discussion.

There are two distinct uses of frequency in the method. Occurrence tendencies in the web corpora determine the odds-ratio ranks and thus which words become candidates for the classifier. After that choice, repetition within the individual training or test document is discarded by the binary representation. A word can therefore enter the vocabulary because of a strong corpus-level contrast while supplying only a presence indicator in each document. The distinction helps explain how the method uses a large corpus without bringing a large set of counts into each prediction.

The classifier is Naive Bayes. In general terms, this approach estimates how likely observed features are under each class label and combines their evidence using a simplifying assumption about the features’ independence given the label. A word’s contribution depends on the labeled training records in which it occurs. The national domains supply those labels. The authors also try a linear SVM with the web vocabulary. Their development results favor Naive Bayes with this sparse set of selected words, reversing the classifier preference in the character-based experiments.

The system called NB Web is the combination of the ranked vocabulary, the presence representation and the Naive Bayes classifier trained on web documents. Its compact form makes the result intelligible at the level of the available evidence. Words outside the selected vocabulary cannot enter the document vector. The approach can nonetheless transfer if enough retained words occur in SETimes and Twitter in patterns useful for identifying their labels. The held-out experiments test that possibility directly.

### Experiments and results

#### Compare the directions of transfer

The experiments use the SETimes and Twitter test splits as held-out destinations. The baseline conditions use a linear SVM fitted either to SETimes or to Twitter. The corresponding in-dataset run trains on the destination’s own collection. The cross-dataset run uses the other collection. NB Web supplies a third condition in which the training texts come from national web domains. For the direct comparison between SETimes and Twitter training, the authors use the shared label inventory of Bosnian, Croatian and Serbian.

The restriction matters on both sides of the comparison. SETimes has no Montenegrin articles in the benchmark, so the news-trained SVM learns distinctions among its available languages. The authors restrict the Twitter baseline data to those same languages for the comparison. This allows the news-trained system to be tested on Twitter without asking it to identify a class absent from its training inventory. It also means that the resulting scores describe the restricted Twitter task. The experiment with Montenegrin uses the full Twitter split and a different set of comparators.

On the SETimes test split, the news-trained SVM reaches 0.995 micro F1 and 0.995 macro F1. The agreement between the measures is consistent with the strong performance of the classifier across the target labels. The Twitter-trained SVM reaches 0.839 micro F1 and 0.672 macro F1 on SETimes. It can still identify a substantial amount of the news material, but the macro result shows that its performance averaged over languages is weaker than its pooled score suggests.

On the Twitter 3-class test split, the Twitter-trained SVM scores 0.929 micro F1 and 0.875 macro F1. The news-trained SVM obtains 0.743 micro F1 and 0.747 macro F1. The change from same-source training to cross-source training is visible for both measures. In this direction the pooled and language-averaged results of the transferring baseline are close, even though the collection favors Serbian in the number of available users. As the per-language analysis later illustrates, the average and the pooled score can diverge markedly when the evaluation puts a difficult, less frequent label back into the task.

The high in-dataset score on SETimes is informative in its own right. It shows that the grouping of parallel articles still leaves a task the character-based method can solve very well under familiar conditions. The authors connect that result to the narrow source of the news material. The Twitter task draws on user histories with mixed content and a skewed label distribution. Together, the baseline runs establish a reference for both situations. A system may be very strong on new texts from its training collection and much less reliable on a changed source.

#### See what web supervision recovers

On the SETimes test split, NB Web reaches 0.957 micro F1 and 0.957 macro F1. The score places it behind the SVM trained directly on SETimes and ahead of the SVM transferred from Twitter. This comparison separates two benefits that a single test score could obscure. Training on the exact news source is highly effective for that source. When the available alternatives are training on Twitter or using the web approach, the selected web words supply evidence that transfers to SETimes more successfully.

Macro F1 by training source on the SETimes test split SETimes training gives the highest score, with web training closer to it than Twitter training.

**The numbers**

| System or setting | macro F1 |
| --- | --- |
| SVM trained on Twitter | 0.672 |
| Naive Bayes trained on the web (this paper) | 0.957 |
| SVM trained on SETimes | 0.995 |

On the Twitter 3-class test split, the ordering changes. NB Web scores 0.946 micro F1 and 0.897 macro F1. The corresponding scores are 0.929 and 0.875 for the SVM trained on Twitter, and 0.743 and 0.747 for the SVM trained on SETimes. The web approach thus improves substantially on the cross-dataset baseline and also scores ahead of the in-dataset baseline on both measures. The latter result is specific to the restricted Twitter evaluation. It gives an example in which recent familiarity with the same collection through its training split is less valuable than the evidence captured by the broader web-based procedure.

Micro F1 by training source on the Twitter 3-class test split Web training gives the highest pooled score, followed by training on Twitter.

**The numbers**

| System or setting | micro F1 |
| --- | --- |
| SVM trained on SETimes | 0.743 |
| SVM trained on Twitter | 0.929 |
| Naive Bayes trained on the web (this paper) | 0.946 |

Taken together, the results show the advantage of using NB Web when the benchmark training collection differs from the target. What transfers is a package of choices. The approach changes the source of the text, the source of the labels, the feature vocabulary, the document representation and the classifier. The reported scores establish that the package works better than direct transfer of the character-based baseline in these tests. The development comparisons and the experiments with training volume give more focused evidence about several of its ingredients.

The distinction between development and test evidence remains relevant here. NB Web is tested on sources outside its parameter-estimation corpus. The authors had nonetheless consulted development data from these sources when choosing the number of words per pair and the form of the feature representation. The scores show that those choices work on held-out examples from the intended test domains. A test on a new domain that had played no part in those choices would address a further kind of portability.

#### Restore Montenegrin to the Twitter task

The full Twitter experiment includes Bosnian, Croatian, Montenegrin and Serbian. It compares NB Web with an SVM trained on the full Twitter training split. These systems can both produce predictions for the full inventory because their training sources include it. The SETimes-trained SVM is absent from this comparison. The full Twitter experiment is therefore the paper’s test of the two approaches under the most inclusive label inventory for which it has held-out examples.

The systems tie at 0.870 micro F1 on the Twitter 4-class test split. The Twitter SVM scores 0.732 macro F1, and NB Web scores 0.682. Equal pooled scores indicate that the overall level of successful decisions is the same on this split. The difference in macro F1 shows that the decisions are distributed differently across the languages. By giving each language equal influence, macro F1 makes that difference visible even when the pooled results coincide.

Macro F1 on the Twitter 4-class test split The Twitter-trained SVM has the stronger language-averaged score.

**The numbers**

| System or setting | macro F1 |
| --- | --- |
| Naive Bayes trained on the web | 0.682 |
| SVM trained on Twitter (this paper) | 0.732 |

The authors suggest that the SVM’s exposure to the distribution of labels in the Twitter training split may help explain its macro F1 advantage. The web method is trained with the same document count for each domain, while Twitter has a concentration of Serbian users. The paper raises the possibility that the ordering by macro F1 could change on a collection with a substantially different distribution of labels. The comparison itself changes several other aspects of training alongside class prevalence, and the experiment evaluates only the distribution in the actual test split. The explanation remains a hypothesis.

The confusion matrices make the practical consequence clearer. Both systems perform well on Croatian and Serbian, and the authors describe Bosnian performance as decent, particularly for NB Web. For Montenegrin, the Twitter SVM identifies 4 of 11 test instances correctly. NB Web identifies one of the 11 and assigns most of the remainder to Serbian or Bosnian. The overall tie thus covers different patterns of success, and both systems leave the identification of Montenegrin substantially unresolved.

### What the ablations show

#### The character evidence that travels

The development experiments on character sequence length ask whether a broader span of character evidence benefits the baseline in the same way across settings. The authors keep the minimum length at 3 and compare character 3-grams with the 3–5-gram range. The longer range raises both micro and macro F1 by 1 to 6 points in development comparisons within each dataset. On cross-dataset development comparisons, the shorter representation leads by 1 to 4 points. Those figures describe the development comparisons used to select the baseline, separate from its held-out scores.

The authors interpret the reversal in terms of specificity. Longer sequences give the classifier capacity to capture more of the patterns peculiar to a collection. When the test set comes from that collection, some of those patterns can remain informative. Shorter sequences can recur in more contexts, which makes them plausible carriers of evidence between collections. The numbers support the choice of character 3-grams for the transfer-focused baseline. The experiment leaves open which specific longer sequences were responsible for the same-source gains and which ones ceased to help after transfer.

The selection of classifier is also informative because the same pair of classifiers is examined with two different representations. The SVM leads when the authors compare it with Naive Bayes on the abundant character 3-gram features. The preference reverses when the representation is the compact vocabulary derived from the web. The authors describe Naive Bayes as more stable across datasets with the selected features. These comparisons associate classifier suitability with the design of the inputs. They give an empirical reason for using the combinations reported in the main experiments.

#### The amount and form of word evidence

Choosing the number of words per ordered pair lets the authors control how much of each ranking enters the representation. The development trials favor around 100 for both classifiers considered with the web approach. That agreement suggests that choosing the vocabulary size was a consequential decision even before settling which classifier to keep. At the selected setting, distinctions learned through separate pairwise rankings are all available together and repeated selections collapse into the same feature.

The experiment gives evidence for a compact setting in these collections. Keeping the highest-ranked portion retains the sharper contrasts according to the method’s scoring rule. Adding more words would extend the list to forms lower in the ranking. The paper establishes the useful setting empirically through development performance and supplies the resulting feature count. It does not trace the effect of vocabulary size to individual word types or to particular language confusions.

The comparison between word counts, TF-IDF and presence offers a separate control. All of these encodings can describe the selected words, but they convey different information about a text. The binary representation gives the most consistent development performance. One way to read that result is that knowing a selected form occurs is sufficient to capture much of its diagnostic value in these runs. Repetition may reflect sustained discussion of a subject as well as a language preference. The paper compares the predictive outcomes of the encodings and leaves the mechanism behind the difference open.

The contrast between feature selection and representation matters when interpreting this result. Odds ratios use the distributions observed in the web corpora to find candidate words. Binary encoding restricts the evidence at the document level after those candidates have been chosen. Success with binary features is therefore consistent with using a great deal of occurrence information during feature discovery. The experiment identifies how to encode the vocabulary after discovery, while the ranking and union determine what can be encoded.

#### Reduce the data used to estimate the classifier

The training-volume experiment varies the quantity of web text used to fit NB Web. The authors use 25%, 50% or 100% of the classifier’s training material and evaluate each setting on SETimes, Twitter 3-class and Twitter 4-class. The figure reports average behavior and expresses variation through standard deviation. That makes stability part of the analysis. A method can achieve similar typical scores at different training sizes while being more sensitive to the sample of documents at one of those sizes.

The paper reports similar performance even at 25% of the training material. Results on SETimes vary little at the smaller sizes. The larger sample is especially helpful for stability on Twitter 4-class. The strongest reading is that, once the compact web vocabulary is in place, much of the observed predictive performance can be obtained with a smaller sample for parameter estimation. The experiment also gives the authors a reason to retain the full training amount when they want more dependable results on the harder Twitter setting.

The scope of the change is important. The authors reduce the data used to fit the classifier, a stage that comes after ranking the words. They leave the amount of data used for ranking as a question for future work. The two stages may respond differently to a reduction in available text. Parameter estimation asks how selected features are distributed among the labeled documents. Word selection has to compare a much larger set of eligible forms before it knows which ones to retain. Similar outcomes at smaller classifier training sizes can coexist with a need for substantial data in the preceding search.

#### Inspect the errors hidden by pooled scores

The confusion matrices for the four-class Twitter test split show how errors are distributed in the most detail. A confusion matrix records how examples carrying each reference label are assigned to the possible prediction labels. Its diagonal tracks correct decisions, and the other cells show where those decisions go wrong. The matrices let the authors identify which labels account for the broad performance they report and which labels remain hard to identify.

The recurring Montenegrin errors are particularly revealing because they persist in both training regimes. The SVM has access to Twitter examples labeled Montenegrin, including the conventions of that collection. NB Web has access to a training corpus associated with .me and a feature selection procedure that includes pairwise comparisons involving that domain. Both kinds of evidence prove inadequate for reliable recognition of the held-out Montenegrin users. For NB Web, the concentration of mistakes in Serbian and Bosnian gives the difficulty a more specific description than a low aggregate score would provide.

The matrices measure outcomes of distinct systems on the same labeled users. Several explanations for the errors remain possible, including the weakness of the domain labels, the forms retained by the vocabulary selection and the difficulty of the particular test collection. The matrices locate the failure at the level of predicted categories. A study aimed at attributing the failure to one source would need to vary training or labeling conditions while keeping more of the rest of the setup fixed.

#### Try a contextual alternative

The authors also report an initial experiment with BERTić, a [transformer](https://md.research.elamur.ai/free/en/concepts/transformer/) trained for the languages of interest. They apply [fine-tuning](https://md.research.elamur.ai/free/en/concepts/fine-tuning/) to the national-web-domain classification task so that the existing system can learn from the domain labels. The run uses 400,000 web documents for one epoch, a pass through the training material. The authors report low scores during that run and no tendency toward improvement.

That observation records the outcome of an initial setting. The authors mention lower learning rates and more complex loss functions as possible directions for additional experiments. They also suggest exploring fine-tuning on the benchmark training data itself. The broader question of whether a contextual representation can exploit the web supervision more effectively than the selected-word approach is left open. The main comparisons concern the character SVM and NB Web, which receive the systematic evaluation across benchmark splits.

### Limitations

#### Limits the authors identify

The authors describe the datasets as an initial test of robustness. SETimes supplies a single news source, and Twitter supplies a collection of user activity gathered with a particular procedure. The authors say that these collections fall short of representing the languages as a whole. Their differences are useful for creating a meaningful transfer test, but coverage of the full range of writing remains an open problem. The authors call for adding collections, especially ones containing all the target languages.

They also question the simplicity of assigning the variation to a single set of separate labels. A linguistically motivated account might describe a text along several dimensions and preserve information that a single predicted category compresses. The authors suggest investigating evidence explicitly identified by linguists and using rules or lexicons to help classify the texts. The study establishes what can be learned for its operational categories. The adequacy of those categories as an account of the variation is a distinct issue.

Word selection from national web corpora brings another stated limitation. A word can attain a high odds ratio because the sites attached to one domain have a characteristic subject or cultural reference. The paper illustrates this with *kuna*, the name of a former Croatian currency. Its association with Croatian web texts can help a prediction while conveying information about the subject of the text. The authors hope that a large collection of texts and many selected features reduce dependence on any particular topic. Their own example shows why the resulting features still need to be interpreted in their collection context.

The authors further describe the uncertainty in using a domain as a label. A text may come from a writer who speaks another language, lives elsewhere or republishes material from another source. The method assumes a frequent alignment between the national domain and the corresponding language, and it applies that assignment across the corpus. The paper recalls a case in the 2014 shared task in which republication affected the British and American English data. That precedent connects the authors’ concern to a concrete problem for data collected from publication sources. [A Report on the DSL Shared Task 2014](https://md.research.elamur.ai/free/en/papers/zampieri-2014-report-dsl-shared-task/)

The ethics discussion gives a more specific consequence of the same labeling rule. Communities can use their language across national borders, including Serbian speakers publishing on the Bosnian web. Assigning those texts the majority language associated with the domain can make evidence of minority usage pull a classifier towards the wrong label. The authors flag the possibility of bias and leave closer analysis for future work. The corpus construction also raises issues of intellectual property and privacy. The authors used freely accessible texts and analyzed aggregate word characteristics, while recognizing that the scale of the automatic collection prevents knowing whether every author consented. [Bias, fairness & safety](https://md.research.elamur.ai/free/en/topics/bias-fairness-safety/)

Finally, the paper treats Montenegrin recognition as unfinished. The full Twitter task is where the benchmark provides the direct test, and the confusion matrices show poor results under both approaches. The authors’ positive conclusion about robust discrimination is grounded chiefly in the results for Bosnian, Croatian and Serbian. Extending that conclusion to Montenegrin would require stronger per-category performance and evidence from additional sources that include it.

#### Limits visible in the experimental design

The transfer test moves across several differences at once. SETimes provides whole articles, while Twitter inputs combine posts by a user. The domains differ in subject matter, collection procedures and label distributions. The experiment measures what happens when those differences come together. The portion of the change in F1 attributable to writing style, length, label prevalence or the unit of prediction remains unresolved. A parallel design for individual factors would be needed to estimate those contributions.

The range of evidence for cross-dataset classification is narrower for Montenegrin. The shared-inventory news and Twitter comparisons cover Bosnian, Croatian and Serbian. The Montenegrin test uses Twitter only, with either Twitter or web training. That design establishes the shortcomings on the observed users and leaves open how the approaches would behave on Montenegrin material from another target source. The availability of the full label inventory in training and in a single test collection is one step towards that question.

The Twitter task also leaves the relationship between user-level and tweet-level language identification open. A long user record can include evidence from many posts, whereas a classifier presented with an individual post would have only the text of that post. The inclusion of posts in other languages further means that accurate recovery of the user label says little about the label appropriate for any particular tweet. The reported scores belong to the pooled record and retain that meaning even when a record includes a mixture of languages.

The web method’s improved scores support a particular training procedure as a whole. The main experiments combine external corpora, weak labels, pairwise vocabulary selection, binary encoding and a different classifier. The controlled comparisons examine some of those choices, including the amount of data used to estimate the classifier. How much of the improvement comes from the variety of web material, how much from pairwise feature selection and how much from other changes remains open. Each explanation concerns a different aspect of the observed package.

Development feedback puts another boundary on the interpretation of transfer. The classifier estimates its label evidence using web documents, then predicts held-out news and Twitter examples. The authors consult development data from those target sources while choosing settings. That procedure supports the use of external training under the benchmark’s rules. Portability to another collection with different text units and language balance remains an empirical question, especially if that collection cannot supply development data of its own.

The choice of metrics answers complementary questions and leaves other ones open. Micro F1 reveals the result across the pooled decisions, and macro F1 reveals performance after equal weighting of the language categories. The confusion matrices add detail about where the decisions go wrong. Together these measurements make clear that the overall Twitter score can coexist with a particular category’s poor recall. They still describe the benchmark’s observed examples. The Montenegrin counts come from 11 users in the test split, so the result gives direct evidence about those users while leaving uncertainty about other samples of Montenegrin text.

### What came after

[Serbian SuperGLUE](https://md.research.elamur.ai/free/en/papers/perovic-2026-serbian-superglue-evaluation-benchmark-south/) cites BENCHić-lang in 2026. Its title places the later work in the development of evaluation benchmarks for South Slavic languages, with Serbian as its named focus. That connects it to the evaluation problem raised here at a broader level. BENCHić-lang makes the language identity of a text the prediction target and changes the source of the test texts to examine portability. Serbian SuperGLUE frames its subject as evaluation for South Slavic systems. The citation establishes a connection between those benchmark efforts. The specific use of BENCHić-lang’s datasets, language discrimination task or web supervision method in the later work is unspecified.

## Cite

Cite as Peter Rupnik, Taja Kuzman and Nikola Ljubešić. 2023. BENCHić-lang: A Benchmark for Discriminating between Bosnian, Croatian, Montenegrin and Serbian. Tenth Workshop on NLP for Similar Languages, Varieties and Dialects (VarDial 2023).

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.18653/v1/2023.vardial-1.11](https://doi.org/10.18653/v1/2023.vardial-1.11)

```bibtex
@inproceedings{rupnik2023benchic,
  title = {{BENCHić-lang: A Benchmark for Discriminating between Bosnian, Croatian, Montenegrin and Serbian}},
  author = {Peter Rupnik, Taja Kuzman and Nikola Ljubešić},
  booktitle = {Tenth Workshop on NLP for Similar Languages, Varieties and Dialects (VarDial 2023)},
  year = {2023},
  doi = {10.18653/v1/2023.vardial-1.11},
  url = {https://doi.org/10.18653/v1/2023.vardial-1.11}
}
```

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