---
title: "Reliable Baselines for Sentiment Analysis in Resource-Limited"
description: "How the Serbian Movie Review Dataset matches reviews by rating, source, and length, and how that changes which sentiment baselines…"
canonical: "https://research.elamur.ai/free/en/papers/batanovic-2016-reliable-baselines-sentiment-analysis-resource/"
---
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/batanovic-2016-reliable-baselines-sentiment-analysis-resource/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2016](https://md.research.elamur.ai/free/en/papers/2016/) / Reliable Baselines for Sentiment Analysis in Resource-Limited Languages: The Serbian Movie Review Dataset

# Reliable Baselines for Sentiment Analysis in Resource-Limited Languages: The Serbian Movie Review Dataset

Paper · 2016 · Vuk Batanović, Boško Nikolić and Milan Milosavljević

**Authors:** Vuk Batanović, Boško Nikolić and Milan Milosavljević · **Year:** 2016 · **Venue:** Proceedings of the Tenth International Conference on Language Resources and Evaluation (LREC'16) · **Licence:** [CC BY-NC 4.0 (ELRA, LREC proceedings)](https://creativecommons.org/licenses/by-nc/4.0/)

Proceedings of the Tenth International Conference on Language Resources and Evaluation (LREC'16) · [licence](https://creativecommons.org/licenses/by-nc/4.0/)

- [Publisher's page](https://aclanthology.org/L16-1427/)
- [PDF](https://aclanthology.org/L16-1427.pdf)

## Summary

A collection can contain equally many favorable and unfavorable reviews and still give a classifier an easy way to guess the labels. If unfavorable reviews come disproportionately from sites with a casual writing style, informal expressions can become clues to a negative rating. Those clues may work well when training and test reviews come from the same collection. They can lose their value when the classifier encounters writing from a different source. Batanović, Nikolić, and Milosavljević study this problem while building a Serbian benchmark for [sentiment analysis](https://md.research.elamur.ai/free/en/topics/sentiment-emotion/).

The authors collect 4725 movie reviews and use the 841 negative reviews as anchors for selecting equally sized positive and neutral groups. A positive review must have the opposite rating on the standardized scale. The selection procedure also favors reviews from the same website and reviews with similar lengths. For neutral reviews, it tries to keep the two middle ratings equally represented. The resulting dataset, SerbMR, contains 2523 reviews and is the first balanced Serbian sentiment dataset that the authors describe as uniform in topic.

The choice of which reviews to keep changes how the benchmark behaves. With a linear support vector machine, random sampling gives a binary cross-validation accuracy of 78.83%, compared with 75.98% on SerbMR under the same initial feature settings. On a separate, manually labeled collection of short movie comments, the order reverses. The classifier trained on SerbMR reaches 62.18%, while the one trained on randomly sampled reviews reaches 59.55%. The reversal also holds for the other classifiers and when neutral texts are included. The authors interpret this pattern as evidence that matching the reviews reduces the value of shortcuts that are specific to the source collection.

The paper also develops baselines by testing text processing choices in stages. Lowercasing, accounting for how often a term appears in a review, and grouping inflected forms through stemming help across the main experiments. Short sequences of words add information beyond individual words. The best binary cross-validation accuracy is 85.55% with NBSVM, which uses class-specific word frequencies to reweight inputs to a support vector machine. On the three-class task, logistic regression gives the best reported accuracy, 63.15%. The authors suggest that the middle rating band is harder to recognize because its reviews can combine praise and criticism, leaving fewer expressions that distinguish them as a group.

## Deep dive: Reliable Baselines for Sentiment Analysis in Resource-Limited Languages: The Serbian Movie Review Dataset

How the Serbian Movie Review Dataset matches reviews by rating, source, and length, and how that changes which sentiment baselines perform best. · about 36 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 a balanced review collection can still make easy

The task is to assign a sentiment label to an entire movie review. The training examples provide both the review text and a label derived from the author's rating. A classifier can then learn associations between recurring expressions and the labels. The evaluation asks whether those associations lead to correct decisions on other reviews. This is a form of [text classification](https://md.research.elamur.ai/free/en/concepts/text-classification/).

An association can help the classifier without telling it much about the writer's judgment of the film. Suppose reviews from one website tend to feature colloquial expressions, and that website supplies a large share of the negative examples. A classifier can learn that the expressions predict a negative label. The association is real within that collection. Its relevance to sentiment depends on whether it persists when the writers, sources, and distribution of ratings change.

Equalizing the number of documents in each class leaves room for this problem. Randomly retaining fewer positive reviews can reduce their total to the desired size while preserving much of the original positive group's mix of sources and styles. The negative group may retain a different mix. If reviews in both training and evaluation are drawn from the balanced collection, the difference is available on both sides of the experiment. A held-out review from that collection can therefore reward a rule based on how the corpus was assembled.

The authors discuss this as a consequence of sample selection bias. They use the term for cases in which the collected reviews give a distorted picture of the wider population of reviews. Their method addresses a specific manifestation of that problem. It tries to make the sentiment classes comparable on properties other than the sentiment the ratings are meant to reflect. This is a different question from whether the collection as a whole captures all the ways Serbian speakers discuss films.

Working with a language for which usable data is scarce makes the selection problem more immediate. The authors could draw from several smaller Serbian sources, but those sources varied in size, in the ratings they contributed, and in the language of their reviews. Gathering more reviews by combining sites therefore increased the amount of training material while creating opportunities for source differences to line up with the labels. Negative reviews were especially scarce, so discarding them to achieve a tidy distribution would have reduced the available evidence for a class the authors already found difficult to collect. This is the paper's central resource problem for [low-resource languages](https://md.research.elamur.ai/free/en/topics/low-resource-languages/).

Review length creates a related issue. Equal document counts can coexist with different amounts of text. When reviews of one class are systematically longer, that class has more opportunities to contain words people use across all ratings. In the authors' account, a learner may then treat some ordinary vocabulary as evidence of polarity because it sees the vocabulary more frequently on one side. Longer reviews also give a classifier more chances to observe a website's characteristic expressions. Matching by source and length addresses different parts of that problem.

The distinction matters for [evaluation and benchmarks](https://md.research.elamur.ai/free/en/topics/evaluation-benchmarks/). An internal test asks whether patterns learned from part of a collection predict labels in another part. A separate test can ask whether the training data supports useful decisions on texts gathered in a different way. The paper uses both questions because a corpus that is easier to classify internally may teach associations that transfer poorly.

#### The choices available before SerbMR

The paper takes the movie review benchmark as an established design. The authors describe much sentiment research as centered on [English](https://md.research.elamur.ai/free/en/topics/english/) and note that several English reference datasets already balanced favorable and unfavorable texts. Those collections gave them a precedent for creating a benchmark with comparable class counts. They also gave the authors English-language results against which to compare some Serbian classifiers. The examples they cite include [Thumbs Up?](https://md.research.elamur.ai/free/en/papers/pang-2002-thumbs-up-sentiment-classification-machine/), [A Sentimental Education](https://md.research.elamur.ai/free/en/papers/pang-2004-sentimental-education-sentiment-analysis-subjectivity/), and [Learning Word Vectors for Sentiment Analysis](https://md.research.elamur.ai/free/en/papers/maas-2011-learning-word-vectors-sentiment-analysis/).

In the review of prior Serbian work, the authors identify a proof of concept that used Naïve Bayes to classify sentiment at the sentence level. They also discuss a system developed by Mladenović and colleagues that used a maximum entropy classifier alongside external resources such as a sentiment lexicon and a version of Serbian WordNet. That system was evaluated on movie reviews and on news data. Its movie review collection included 347 negative examples, or ~15% of the collection. In the news datasets, the sources supplying the sentiment classes differed systematically in subject matter as well as in sentiment.

That news example makes clear why the benchmark's subject matters. A classifier can use words that identify what a text discusses if subjects and labels tend to occur together. Taking all reviews from the movie domain narrows that opportunity. The authors also screen out sites that specialize in a single film genre, since a narrowly focused source could introduce more specific subject differences within the broad movie category. The selection procedure then addresses remaining differences in source, review length, and rating distribution.

Random undersampling was the familiar way to reduce larger classes to the size of a smaller one. The authors consider it appropriate when the original collection lacks the selection problems they are concerned about. They distinguish their task from previous studies that explored alternative ways to undersample sentiment datasets without targeting sample selection bias. They also discuss domain adaptation, which addresses differences between the data a classifier learns from and the data it must handle. That work is closely related to their concern about transfer, although their immediate intervention is to change which examples make up the benchmark. One example they cite is [Biographies, Bollywood, Boom-boxes and Blenders](https://md.research.elamur.ai/free/en/papers/blitzer-2007-biographies-bollywood-boom-boxes-blenders/).

The authors describe other proposed corrections that make different demands on the data. One requires an explicit account of the probability that a text is selected. Another uses clustering to expose structure before rebalancing and needs extra unlabeled material. The SerbMR procedure starts from information already attached to the available reviews. The website identifies the source, the text yields its length, and the rating determines eligibility for a sentiment group and, for positive reviews, for a particular pairing.

The choice of classifiers is also deliberate. The authors acknowledge recent deep-learning results, including [Convolutional Neural Networks for Sentence Classification](https://md.research.elamur.ai/free/en/papers/kim-2014-convolutional-neural-networks-sentence-classification/). They emphasize earlier findings that uncomplicated feature weighting and familiar learning algorithms can give strong initial comparisons. For a language with scarce labeled data, it is especially valuable to learn how far those techniques go before deciding what a more elaborate system must improve on. The paper takes both a precedent for simple baselines and the NBSVM classifier from [Baselines and Bigrams](https://md.research.elamur.ai/free/en/papers/wang-2012-baselines-bigrams-simple-good-sentiment/).

### The method, step by step

#### Building a common rating scale

The authors first identify Serbian websites with enough scored movie reviews to justify collecting from them. These include smaller sites such as blogs and culture news portals. Websites with fewer than 100 reviews are excluded because, in the authors' search, sites of that size yielded very few negative examples. They also exclude sites focused on a single film genre, sites with prohibitive copyright policies, and sites whose writing is predominantly outside the Ekavian pronunciation. The pronunciation criterion is intended to reduce variation in word forms in an already small corpus.

Each retained text needs a rating that can be compared with ratings from other websites. Most accepted sites used a 1–10 scale, which the authors chose as the standard. The sites yc.rs and happynovisad.com used a 1–5 scale. For those sites, the authors double the original rating and adjust the converted value upward or downward if the original score carried a plus or minus. On sites already using the 1–10 scale, they ignore pluses and minuses and round X.5 down to X, where X is the integer part of the rating. They map the occasional zero to the bottom of the standard scale.

The standard scale defines the classification labels. Ratings of 1–4 are negative, 5–6 are neutral, and 7–10 are positive. A neutral label in this study therefore means that the film received a rating in the middle band. A reviewer can reach that judgment after describing favorable and unfavorable aspects of the film. The difference between a middle rating and an absence of opinion becomes important when the authors interpret the three-class experiment.

From scored Serbian movie reviews to sentiment baselines The steps in order.

#### Finding positive matches

The negative class sets the attainable size of the balanced dataset. Every available negative review is retained, and the procedure looks for a positive match for each one. The rating condition stays in force throughout the search. A negative rating of 1 can be matched only with a positive rating of 10, while a rating of 4 can be matched with 7. The mirror relationship is intended to give the polar groups comparable rating strength. If a positive class were drawn mainly from reviews just above the neutral band, for instance, the resulting classification task could put one polarity closer to the middle than the other.

Within the required positive rating, the initial search favors reviews from the same website with a sufficiently similar length. Length is measured in tokens, the units produced when text is divided for processing. In the paper's corpus counts, punctuation is excluded. Matching length by token count therefore constrains how much word material the paired documents contribute. [Tokenization](https://md.research.elamur.ai/free/en/concepts/tokenization/)

```
|length(PR) − length(NR)| < diff
```

Here PR is a positive candidate and NR is the negative review being matched. The function length gives the token count of a review. The minus sign gives the signed difference between their lengths, and the vertical bars take its absolute value. The less-than sign requires that the difference fall below diff, the current tolerance. The paper starts diff at 100. A difference equal to that threshold falls outside the initial condition.

When the initial search comes up empty, the procedure first allows candidates from other websites while keeping the current length tolerance. If that still leaves no candidate, it increases the tolerance in steps of 50. Each increase restores the initial preference for the same website. At the wider tolerance, the search again looks locally before allowing candidates from elsewhere. The rating condition remains fixed. This order expresses a design choice about the two conditions that can be relaxed. The authors prefer to accept a similarly long review from another source before taking a much longer or shorter review.

Candidate lists are formed before positive reviews are assigned. The algorithm processes negative reviews with fewer candidates before reviews with more options. This matters because a positive review can be selected for only one match. If a review with many alternatives takes the only close match for another anchor, the later search must relax its conditions sooner. Handling the constrained cases first reduces the likelihood of having to widen a search after other assignments have used up its candidates.

Among eligible positive candidates, the procedure favors the smallest absolute difference in length. When candidates tie, the direction of the difference can break the tie. If the positive group already has more tokens overall, a candidate shorter than its negative counterpart can help narrow the gap. If the group has fewer tokens, the reverse can help. The tie-breaking rule therefore uses the state of the collection as well as the properties of the current pair.

This is a sequential assignment procedure. Each choice is made using the candidates that remain at that point. The paper motivates the order by the practical effect of saving scarce matches. The procedure can produce very similar class totals without treating review length as an exact constraint on every pair. Indeed, the relaxation steps are there because the supply of reviews with the required rating, source, and length need not line up perfectly.

#### Finding neutral matches

The neutral search uses the same negative anchors and the same idea of finding similar lengths, with the same website preferred initially. The two neutral ratings are handled differently from the positive ratings. Both 5 and 6 can enter the candidate list. Rating then helps decide which candidate to select, because the target is balance across the whole neutral group.

The algorithm keeps a running count of selected reviews at each neutral rating. When the counts differ, it prefers the best available candidate from the rating that has been selected less often. If the candidate list has no review at that rating, selection proceeds from the other rating. When the running totals are equal, both ratings compete on the ordinary matching criteria. A choice that increases the rating imbalance at one point can be compensated for by later selections.

The neutral rule is useful because there may be a good source and length match for a negative anchor at either rating. A fixed requirement that each anchor take a specific neutral rating could force the procedure to pass up suitable candidates. Tracking the group totals gives it flexibility over individual pairs while still aiming to represent both sides of the middle band.

Once selection is complete, the dataset has one neutral and one positive review for each negative anchor. The authors make the result available as the Serbian Movie Review Dataset, or SerbMR. The matching procedure selects the texts that enter the benchmark. The classifiers subsequently predict sentiment from features of the review text. They do not need to find a partner review when classifying a new document.

#### Turning each review into features

The baseline experiments use features built from words and neighboring words. Each review is represented by a vector whose coordinates stand for particular patterns. A coordinate can record whether its pattern occurs or how often it occurs. One word on its own is a unigram. A bigram groups adjacent words, and a trigram extends that sequence by another word. A sequence feature can distinguish a recurring local expression from other uses of its individual words. The general term is an [n-gram](https://md.research.elamur.ai/free/en/concepts/n-gram/).

As a starting point, the authors use WEKA’s default configuration, which selects the 1,000 binary unigram features with the highest frequency in each class. Binary here describes the value of a feature. A word that appears several times in a document has the same presence value as a word that appears once. This meaning of binary is independent of the number of sentiment classes. The three-class task can use binary feature values, and the binary sentiment task can use counts.

Before broadening the feature vocabulary, the authors evaluate a way to mark negation. Prior work prefixes words after a negator up to the next punctuation mark. A marked word then has a different feature identity from the same word in an unmarked context. This lets the classifier learn separate associations for those uses without having to analyze the grammatical scope of each negation. The SerbMR study tests how much of the following text to mark. Its shorter windows restrict the transformation to words close to the negator.

The authors next vary the number of distinct patterns considered and how frequently a pattern must occur to qualify. A frequency cutoff and a limit on vocabulary size do different jobs. The cutoff removes patterns with too little observed support, while the cap bounds how many frequent patterns can be retained. The study also compares applying these rules by class with applying them over the full dataset. A per-class filter can preserve a pattern that is common within one label even if a filter over the entire collection gives it a different rank.

Lowercasing is examined with these vocabulary choices. It lets occurrences that differ only in capitalization share a feature. The authors then vary the values assigned to the retained coordinates. Raw counts preserve repetition. Term-frequency normalization adjusts the influence of within-document counts. Inverse document frequency also uses information about how widely a term occurs across documents. The paper tests the latter in conjunction with term frequency, a scheme known as [TF-IDF](https://md.research.elamur.ai/free/en/concepts/tf-idf/). A separate length-normalization option tests whether scaling the document representation by its length helps after the dataset has already been matched partly on that property.

A later stage tests four stemmers. Two are the optimal and greedy variants by Kešelj and Šipka. The other Serbian option is Milošević's revision of the greedy algorithm. A stemmer from Ljubešić and Pandžić was developed for Croatian, which the authors describe as closely related to Serbian. They reimplement the four in a common WEKA package so they can compare them within the same workflow. The operation is [stemming](https://md.research.elamur.ai/free/en/concepts/stemming/).

Stemming lets forms that would otherwise occupy separate coordinates share a representation. This is particularly relevant to Serbian [morphology](https://md.research.elamur.ai/free/en/topics/morphology/). If several forms associated with the same word occur infrequently on their own, pooling their occurrences can leave a classifier with more examples from which to estimate the word's association with a class. The authors describe this change in part through a corpus statistic.

```
|N| / |V|
```

Here |N| is the total number of tokens in the corpus or subset under discussion, and |V| is the count of distinct vocabulary entries. The slash denotes division. The quantity gives the average number of occurrences per vocabulary entry. Combining forms through stemming can raise this average by shrinking the vocabulary even though the number of word occurrences in the reviews stays the same.

The last feature stage adds bigrams and then trigrams to the unigram representation. Larger feature sets make it possible to retain local context, but a sequence is a more specific observation than an individual word. The authors test whether each addition earns its place on the benchmark. The binary and three-class tasks can retain different variants, because the usefulness of an expression depends on the distinctions the classifier has to make.

The feature search is incremental. A new option is judged against the settings that have survived the preceding stages. The authors generally look for a positive effect across classifiers, accepting that one classifier may lose a little when the others gain. For the binary frequency threshold, they make an explicit speed tradeoff and accept a modest accuracy cost. The resulting settings reflect both the test sequence and the authors' criterion for a practical baseline.

#### Fitting and comparing the classifiers

The main comparisons use multinomial Naïve Bayes, logistic regression, and a support vector machine. Multinomial Naïve Bayes, abbreviated MNB, uses the distribution of features within each class to evaluate a document. Logistic regression, or LR, learns weights that support discrimination between classes. A support vector machine, or SVM, also learns a separating decision rule and uses the margin to express how far an example lies on one side of a decision boundary. The paper uses WEKA's MNB implementation and LIBLINEAR implementations of LR and SVM. These are the core [machine learning](https://md.research.elamur.ai/free/en/concepts/machine-learning/) comparisons.

The authors apply L2 regularization to LR and SVM and use L2 loss for SVM. Regularization penalizes large weights during training, while the loss specifies the penalty associated with imperfect decisions. The LR and SVM search varies the cost C from 10⁻³ to 10³, the bias b over {0, 1}, and the epsilon tolerance from 10⁻³ to 10¹. The cost controls the weight given to training errors, the bias setting governs whether the decision rule has an intercept, and the tolerance controls when the optimization can stop. The search also considers turning LIBLINEAR normalization on or off.

For the main evaluation, the authors average 10 runs of 10-fold cross-validation. Each run rotates which fold is held out for evaluation while the others supply training examples. Hyper-parameter selection is nested within cross-validation for the classifiers that require it. This gives the hyper-parameter search training data of its own while reserving the outer held-out fold for evaluating the resulting classifier. The paper uses a separate cross-validation setup for the comparison with English because there the size of a training partition is part of the comparison.

#### Combining feature frequencies with an SVM

The NBSVM experiments ask whether the incremental feature choices also help a classifier that already reweights its inputs based on sentiment labels. The method first measures the relative frequency of each feature in the two classes. It then uses that information to transform the document vector that the SVM receives. Learning the SVM weights is a separate step. The feature ratios indicate where the classes differ, and the fitted classifier determines how to combine the resulting evidence.

```
p = α + ∑ᵢ:Class(i)=Pos f⁽ⁱ⁾
```

The vector p holds the smoothed feature totals for the positive training class. The symbol α is the smoothing amount added to every coordinate. The summation sign adds the vectors f⁽ⁱ⁾ for the training reviews indexed by i. The function Class(i) gives the class label for review i. The condition after the colon restricts the sum to reviews whose class equals Pos, the positive label. The equals sign on the left defines p from those quantities.

```
q = α + ∑ᵢ:Class(i)=Neg f⁽ⁱ⁾
```

The vector q holds the corresponding smoothed feature totals for negative training reviews. The symbol Neg denotes the negative label. The condition Class(i)=Neg selects reviews of that class, with i again indexing training reviews and f⁽ⁱ⁾ giving each review's feature vector. The summation adds the selected vectors, and α supplies the same smoothing amount to each coordinate. The authors set α to 1. Smoothing allows the comparison to include a feature that has no observed occurrences on one side.

```
r = log((p / ‖p‖₁) / (q / ‖q‖₁))
```

The vector r gives the log ratio for each feature. Here p and q are the positive and negative count vectors. The notation ‖p‖₁ and ‖q‖₁ denotes their L1 norms, the respective sums of absolute coordinate values. The inner slashes divide each count vector by its own total. The outer slash divides corresponding coordinates of the two normalized vectors. The function log takes the logarithm of each resulting ratio, and the parentheses indicate which quantities are operated on together.

Normalizing the class totals first lets the comparison reflect a feature's share of each class's feature mass. A feature with a larger relative frequency in the positive class receives a positive log ratio. One with a larger relative frequency in the negative class receives a negative ratio. Similar relative frequencies produce a ratio whose logarithm is close to zero. The transformation uses the direction as well as the size of the class contrast.

```
f̃⁽ᵏ⁾ = r ∘ f⁽ᵏ⁾
```

The index k identifies the review whose features are being transformed. The vector f⁽ᵏ⁾ is its original representation and r is the ratio vector learned from training. The circle ∘ multiplies corresponding coordinates. The tilde marks f̃⁽ᵏ⁾ as the transformed representation supplied to the SVM. The method can use presence values or non-binary values in f⁽ᵏ⁾, and the authors compare both.

#### Extending the ratios to the middle class

The multiclass extension fits a separate binary classifier for each possible output label. For any class under consideration, reviews with that label make up the target group and all reviews with other labels are pooled into its complement. The method estimates a new ratio vector for each such comparison. In the comparison for neutral, the complement therefore includes both polar classes. In the comparison for positive, it includes negative and neutral reviews.

```
p = α + ∑ᵢ:Class(i)=C f⁽ⁱ⁾
```

In this calculation, C is the target class and p contains its smoothed feature totals. The training review index is i, f⁽ⁱ⁾ is that review's feature vector, and Class(i) is its label. The condition Class(i)=C directs the sum to include reviews with the target label. The quantity α is added coordinate by coordinate as before.

```
neg_p = α + ∑ᵢ:Class(i)≠C f⁽ⁱ⁾
```

The vector neg_p contains the smoothed totals for the complement of C. The unequal sign in Class(i)≠C includes every training review whose label differs from the target. The sum combines their vectors f⁽ⁱ⁾, and α smooths each coordinate. Here neg_p names the opposing group in a particular comparison. That group depends on C and can contain reviews from the neutral or positive rating bands.

```
r꜀ = log((p / ‖p‖₁) / (neg_p / ‖neg_p‖₁))
```

The subscript on r꜀ indicates that the ratio vector belongs to target class C. The vectors p and neg_p are normalized by their respective L1 norms, the sums of the magnitudes of their coordinates. The division between normalized vectors and the logarithm operate coordinate by coordinate. This gives each comparison its own feature weighting.

```
f̃꜀⁽ᵏ⁾ = r꜀ ∘ f⁽ᵏ⁾
```

The vector f̃꜀⁽ᵏ⁾ represents review k for the classifier associated with C. It is formed by multiplying the original vector f⁽ᵏ⁾ by r꜀ element by element, as indicated by ∘. The input review is the same across the class comparisons, while the transformed representation can differ. For a new review, the paper's one-vs-all decision takes the class whose SVM gives the greatest margin.

The authors also interpolate the trained SVM weights with a shared weight magnitude within each classifier. They follow the original NBSVM procedure for the binary case and apply it separately to each binary classifier in the extension.

```
w′ = (1 − β)(‖w‖₁ / |V|) + βw
```

The vector w contains the weights fitted by the SVM, and w′ contains the final weights. The prime distinguishes the final vector from the original one. The norm ‖w‖₁ sums the magnitudes of the weights, and |V| counts the features over which the mean is taken. The resulting scalar contributes the same amount to each coordinate. The parameter β controls how much of the fitted weight remains. The factor 1 − β weights the shared contribution, while β multiplies w. In the multiclass version, each binary classifier supplies its own w and mean magnitude, while all use the same β.

The paper searches β over {0.25, 0.5} using nested cross-validation, alongside the SVM hyper-parameters searched earlier. Its NBSVM implementation is a WEKA package that uses LIBLINEAR. The experiments start from the selected feature counts, then test the fuller processing and weighting choices with different n-gram orders. This lets the authors ask whether improvements found with the basic classifiers still help after the class-ratio transformation.

### Experiments and results

#### The collected reviews and the selected benchmark

The raw collection has 4725 reviews. The rating groups contain 841 negative, 1278 neutral, and 2606 positive reviews. Positive reviews are the most numerous group on every included website, even though the proportions vary markedly. The length distribution differs as well. In the pooled data, the average is 468 tokens for a negative review, 467 for a neutral review, and 529 for a positive review.

The source counts show why global undersampling and matching by website are different interventions. Filmskerecenzije.com contributes 23 negative and 335 positive reviews. Mislitemojomglavom.blogspot.com contributes 246 negative and 265 positive reviews. In the raw data, a review's sentiment class thus changes how likely it is to have come from each site. Equalizing the totals by random selection need not bring those source shares closer together. Deliberately looking within the same site makes the imbalance relevant to which reviews get selected.

After matching, SerbMR has 841 documents in each class. The full three-class benchmark, SerbMR-3C, contains 2523 reviews and 1185K tokens. The binary benchmark, SerbMR-2C, uses the same selected negative and positive groups, with 1682 reviews and 791K tokens. Average review lengths in the selected negative, neutral, and positive groups are 468, 469, and 473 tokens, respectively. The corresponding aggregate counts are 393K, 394K, and 398K tokens. The similar averages and totals show the direct effect the selection rule was designed to have on the amount of text per label.

The paper compares these corpus statistics with English MR 1.0 and MR 2.0. English MR 1.0 has 1400 reviews and 992K tokens, while SerbMR-2C has more reviews and fewer tokens. The vocabulary of SerbMR-2C contains 116K distinct entries, compared with 44K in English MR 1.0. The reported average occurrences per vocabulary entry are 7 and 23, respectively. The authors connect this greater sparsity to Serbian morphology. They also report that the positive class in the English collections is ~10% larger by token count, whereas the Serbian groups were selected partly to keep their totals close.

#### The balancing comparison inside and outside the corpus

The control for the balancing experiment uses 10 randomly undersampled collections. Each one retains the negative reviews and selects 841 reviews from each of the neutral and positive pools. These collections and SerbMR have the same class counts. The authors then use the same initial representation, the 1000 most frequent binary unigrams per class, to compare the training collections with the basic classifiers. Accuracy is the percentage of evaluated texts assigned the correct label. The random-sampling figures average performance across the sampled collections.

Binary SVM cross-validation accuracy on randomly sampled reviews and SerbMR With the initial feature settings, randomly sampled reviews yield higher internal accuracy than matched reviews.

**The numbers**

| System or setting | accuracy % |
| --- | --- |
| Randomly sampled subsets | 78.83 |
| SerbMR (this paper) | 75.98 |

The binary result is consistent across classifiers. MNB reaches 76.78% on the randomly sampled subsets and 75.29% on SerbMR. LR reaches 78.77% and 75.75%, respectively. In the three-class setting, the samples selected at random give MNB 56.42%, LR 58.28%, and SVM 58.41% in cross-validation. The corresponding SerbMR scores are 54.72%, 55.14%, and 55.49%.

The authors then use the trained classifiers on an independent, balanced collection of short movie comments. The comments were labeled manually, a different route to ground truth from deriving labels from website ratings. The evaluation keeps the movie domain while changing the kind of text. Overall accuracies are lower on the short comments, which the authors describe as a harder setting than document-level sentiment classification. Yet the ranking of the training collections reverses.

Binary SVM accuracy on independent short movie comments by training collection The SVM trained on matched SerbMR reviews transfers better to short comments.

**The numbers**

| System or setting | accuracy % |
| --- | --- |
| Randomly sampled subsets | 59.55 |
| SerbMR (this paper) | 62.18 |

The other binary classifiers show the same direction. MNB gives 59.79% after training on randomly sampled reviews and 61.56% after training on SerbMR. LR gives 59.75% and 61.33%, respectively. For the three-class comments, training on the random subsets yields 46.27% with MNB, 43.95% with LR, and 43.66% with SVM. Training on SerbMR gives 47.18%, 45.82%, and 45.77%.

These results matter together. The cross-validation experiment shows that random subsets support more accurate predictions when the evaluation uses reviews from those same subsets. The independent test shows that the associations learned from SerbMR transfer better to a different set of movie texts. The authors give a concrete route by which this could happen. They identify 2kokice.com, filmskihitovi.blogspot.com, and mislitemojomglavom.blogspot.com as sources where informal writing is more common. Collectively those sites are more strongly represented in the negative group of the raw collection. Their register can therefore carry label information within the sampled reviews even where it has little value for predicting the sentiment of an outside comment.

#### The best settings for the basic classifiers

The feature experiments continue on SerbMR. In the binary task, the progression moves from the initial unigram settings through more features, different feature values, stemming, and longer sequences. With unigrams, bigrams, and trigrams in the final binary rows, cross-validation accuracy is 83.66% for MNB, 84.44% for LR, and 84.25% for SVM. The LR result is the strongest of the basic binary baselines.

On SerbMR-3C, the best results for LR and SVM come from combining unigrams and bigrams. Their cross-validation accuracies are 63.15% and 62.85%. MNB gives 60.75% with that feature set and 61.01% when trigrams are also included. Across the classifiers, the common three-class configuration retains bigrams without trigrams. This illustrates the authors' selection rule. They favor a choice with broadly favorable effects even when one classifier would individually benefit from another option.

The figures for the full settings and the figures for the initial balancing comparison answer different questions. For instance, the initial SVM result on SerbMR-3C reflects the feature setup shared with the random-sampling controls. The stronger LR result on the same three-class corpus reflects a sequence of feature changes explored after that comparison. The improved settings establish more useful baselines for the benchmark. The independent-comment result establishes what the paper measured about transfer under the initial settings.

#### Comparing Serbian and English with similar training volumes

A comparison based on the number of reviews would assign the classifiers different amounts of text. The authors instead choose fold configurations that yield similar training token counts. Three-fold cross-validation on English MR 1.0 gives 661K training tokens, and five-fold cross-validation on SerbMR-2C gives 633K. For the Serbian side, the paper averages 20 runs of five-fold cross-validation. The English scores come from Pang and colleagues' earlier experiment.

The Serbian runs either emulate the earlier feature settings or apply the choices developed on SerbMR. The English numbers are therefore a comparison point from prior work, while the effect of using the paper's settings can be examined within the Serbian runs. For instance, the unigram-plus-bigram comparison includes an English binary-feature setup with 80.6% accuracy for MNB, 80.8% for LR, and 82.7% for SVM. In the Serbian setup with a minimum frequency of 4, binary features give 81.64%, 79.89%, and 80.56%, respectively. The corresponding Serbian rows with the selected processing options give 82.68%, 83.83%, and 83.51%.

The paper uses a paired corrected resampled t-test to evaluate the differences between the Serbian settings. The reported levels are 0.05 and 0.01. In the unigram-plus-bigram comparison with that frequency setting, the table marks the LR improvement at 0.01 and the SVM improvement at 0.05. The authors observe that the older English results are often close to or above the Serbian results when the older processing settings are emulated, even though the Serbian runs tune the classifier hyper-parameters. Their selected processing choices improve several of the Serbian comparisons, particularly for LR and SVM.

#### Where NBSVM sets the best baseline

On SerbMR-2C, NBSVM's strongest result uses unigrams, bigrams, and trigrams with the full selected settings and binary feature values. With that same range of n-gram orders, the feature-count settings alone give 84.05% accuracy. The full settings with non-binary values give 85.52%, and switching back to presence values gives 85.55%. These are cross-validation results under the main evaluation protocol.

NBSVM cross-validation accuracy on SerbMR-2C with unigrams through trigrams The full settings outperform feature counts alone, and the choice of presence or count values matters little at the top.

**The numbers**

| System or setting | accuracy % |
| --- | --- |
| Selected feature counts | 84.05 |
| Full settings with non-binary features | 85.52 |
| Full settings with binary features (this paper) | 85.55 |

On SerbMR-3C, NBSVM works best with the full settings, binary features, and unigrams plus bigrams. Its accuracy there is 62.69%. Keeping the same feature-value choice and adding trigrams gives 62.24%. The result with unigrams and bigrams falls below the strongest LR and SVM results on the three-class task. Thus the preferred classifier depends on whether the benchmark includes neutral reviews, even though the additional text processing helps NBSVM in both settings.

### What the ablations show

#### The selection comparison tests a package of controls

The random-sampling comparison changes how reviews are chosen while holding the class counts and initial feature representation fixed. The common negative reviews anchor both training constructions. Each training collection nonetheless puts a different set of texts into the larger groups. The repeated reversal between internal cross-validation and the independent test supports using the matching rules together to improve transfer in this experiment.

The comparison does not isolate source restrictions, rating restrictions, and length matching in separate runs. Consider the role of length. SerbMR's selected groups have similar token counts, which shows that matching is effective at making that measured property comparable. The independent comment results do not specify how much of the accuracy gain came from that change. The source argument is grounded in the distribution of informal reviews across ratings, but the experiment does not quantify the gain from source matching alone either. The study offers a direct comparison of selection strategies and an account of why the combined strategy might work.

#### Keeping negation marking close to the negator

With the initial feature setup held in place, the negation experiment changes which words receive a prefix. On SerbMR-2C, marking through the next punctuation gives 75.28% SVM accuracy. Marking 1 following word yields 76.64%, while marking 2 gives 76.45%. In that task LR slightly favors the 2-word setting, with 76.33%, over the 1-word setting at 76.31%. The authors carry the 1-word setting into the subsequent binary experiments.

On SerbMR-3C, the SVM comparison gives 55.26% for marking through punctuation and 56.13% for marking 2 words. MNB also favors the 2-word variant among those options, while LR reaches 55.89% with 1 word and 55.81% with 2. The authors carry forward the 2-word setting for the three-class task. Longer windows generally lose the gains shown by the short ones.

A prefix changes the identity of every feature to which it is applied. A long window can therefore separate many occurrences from unmarked versions even when some of those words contribute little to the negated expression. Keeping the window short limits this change to nearby words, where it can provide a useful signal without fragmenting as much of the vocabulary. The measured outcome is accuracy under the respective marking rules. The experiment offers no separate labels for the grammatical scope of individual negators.

#### Vocabulary size and the way features are counted

Increasing the vocabulary beyond the initial 1000 frequent unigrams per class generally helps on SerbMR. After selecting the shorter negation window for the binary task, the authors report 80.06% for MNB using 10,000 features per class. The corresponding 100,000 setting gives 79.93%. LR and SVM gain somewhat under the larger setting, which shows that the vocabulary cap can affect the classifiers differently. The paper then examines minimum frequency and whether feature limits are applied by class or over the dataset.

In the binary search, the minimum frequency is partly an efficiency decision. A higher threshold lets the classifier work with fewer rare patterns. The paper accepts a small accuracy cost because the speed improvement is substantial in the authors' experience. For the three-class task, the table reports the same accuracies for the tested minimum frequencies of 2, 3, and 4 per class. This makes it possible for that choice to reduce the feature space without affecting the reported scores at that stage.

Lowercasing gives a consistent improvement. In the three-class feature-count sequence, LR reports 57.88% in the selected row covering those minimum frequencies and 58.43% once tokens are lower-cased. SVM moves from 57.89% to 58.62%. This is a small change in preprocessing with a straightforward effect on the representation. Evidence for a form can accumulate across occurrences with different capitalization.

The comparison between binary features and raw counts depends on the learner. In the binary experiment, MNB gives 80.21% at the lower-cased binary-feature step and 79.51% when the features are raw token counts. LR gives 79.66% and 81.94% at those steps, and SVM gives 79.53% and 81.73%. Repetition is useful to the two discriminative classifiers in this experiment. For MNB, simple presence works better than leaving the repeated occurrences unnormalized.

Term-frequency normalization improves the raw-count settings for all three basic classifiers. In the three-class test, the raw-count scores are 57.94% for MNB, 59.05% for LR, and 59.06% for SVM. Under term-frequency normalization, the corresponding figures are 58.52%, 60.59%, and 60.57%. The extra inverse-document-frequency weighting is more dependent on the task and classifier. For instance, in the binary setting it gives LR 82.63%, compared with 82.29% for term-frequency normalization, while MNB goes from 80.31% to 76.86%. In the three-class setting, adding the inverse-document-frequency component yields lower accuracy for all three classifiers than the term-frequency row. The authors retain term-frequency normalization as the more consistently beneficial setting.

The separate document-length normalization option offers no comparable gain. On the three-class task it yields 58.24% for MNB, 59.62% for LR, and 59.54% for SVM, below their respective term-frequency results. The authors suggest that the failure of document-length normalization to help may reflect the dataset construction. When the classes already contribute similar amounts of text and have similar average review lengths, some of the variation that might otherwise motivate such normalization has already been reduced.

#### Stemming changes which evidence is shared

The stemmers lower vocabulary size by ~30–35% and raise the average number of occurrences per entry by ~50%, as reported by the authors for SerbMR. This is one way to see how stemming changes the amount of evidence available for a feature. Word forms that previously had few examples can contribute to the same coordinate. The class comparison can then use the pooled observations to estimate a stronger association.

The accuracy rows show that the choice of stemmer matters even though the reduction in vocabulary is similar. On SerbMR-2C, the greedy Kešelj and Šipka variant gives SVM 83.08%, the optimal variant gives 83.35%, and the Milošević variant gives 83.69%. The Ljubešić and Pandžić stemmer gives 83.95%. On SerbMR-3C, that stemmer gives LR 62.26%, compared with 60.91% for the greedy variant and 62.09% for Milošević.

A corpus statistic such as vocabulary size describes how much material a stemmer merges. Classification accuracy also depends on which forms are merged. The authors attribute the differences between stemmers to the quality of their rules. The comparison supports the choice of Ljubešić and Pandžić for these review experiments. It gives no direct ranking of stemmers for tasks where distinctions between word forms may have a different value.

#### Phrase length helps differently when neutral reviews enter

Bigrams improve on the unigram settings for all three basic classifiers in the reported final stages. In the binary experiment, for instance, MNB gives 81.19% with the selected stemmed unigram settings and 83.26% when bigrams are included. Trigrams bring that classifier to 83.66%. For binary LR, the bigram row gives 84.07% and the row that also includes trigrams gives 84.44%.

On the three-class task, LR goes from 63.15% with unigrams and bigrams to 62.66% when trigrams are added. The SVM result moves from 62.85% to 62.57%. MNB improves, but the adverse movement for the discriminative classifiers is why the study favors the shorter feature set overall. In a setting with clearer separation between the labels, the authors suggest that more specific sequences have a better chance of encoding useful distinctions. With the middle rating band included, extra sequence features can add variation without clarifying where the review as a whole belongs.

#### What the ratio transformation can exploit

In the NBSVM experiments, moving beyond the selected feature counts to the full processing settings helps for each of the tested n-gram configurations. For instance, on SerbMR-3C with unigrams the settings reach 59.93% with the selected counts alone and 61.05% with the full non-binary settings. The configuration that restores binary feature values reaches 61.29%. The comparison adds several processing changes together. It shows that the complete feature treatment can improve a ratio-weighted SVM, while the preceding experiments with the basic classifiers provide the more specific comparisons for individual choices.

Returning to binary values has a clearer effect for three classes. With unigrams and bigrams on SerbMR-3C, the full non-binary settings give 61.69%, while the binary variant gives 62.69%. The corresponding binary-task comparison is 85.45% with non-binary features and 85.36% with binary features. Thus the tendency of an ordinary SVM to benefit from non-binary features does not settle the feature-value choice for NBSVM. The ratio transformation changes what the SVM receives.

The authors link the binary advantage of NBSVM to what a log ratio emphasizes. A favorable expression that appears frequently in positive reviews and rarely in negative ones is assigned a relatively large weight magnitude before SVM training. The same logic applies in the other direction for unfavorable expressions. To identify a neutral review, however, the comparison pools positive and negative reviews on the other side of the boundary. Expressions of praise or criticism can be common both in that pooled group and in the neutral group, especially when neutral reviews reach a middle rating by weighing favorable aspects against unfavorable ones.

Under that interpretation, the useful evidence for a middle rating can lie in the combination of signals across a document. A ratio computed separately for each feature emphasizes evidence that is distinctive by itself. It cannot directly express the fact that a writer praised one aspect and criticized another elsewhere in the same review. This is the authors' explanation for why the ratio method helps more in their binary experiments. They also report trying LR in place of SVM in the ratio-based classifier and finding near-identical results, suggesting that switching the downstream linear classifier left this behavior largely intact.

### Limitations

#### Qualifications the authors make

The paper ties the usefulness of simple baselines to the available quantity of labeled Serbian text. The chosen methods are intended to establish comparisons that can be run with that data. The authors propose collecting material from domains such as music, books, and products as a way to expand the amount available. They also identify short-text processing in a morphologically complex language as a problem for further work. The independent short comments serve as a transfer test here, while the main feature development uses document-length movie reviews.

The authors qualify their conclusions about stemming. Their comparison supports a particular stemmer for sentiment classification of Serbian documents under the tested settings. They explicitly leave open whether the same ranking would apply to other language tasks. They also qualify the finding that length normalization offered little benefit, since a result obtained after matching examples by length may depend on that construction choice.

For English and Serbian, the paper identifies differences in the learning libraries as a reason the earlier hyper-parameter settings could not simply be reproduced. The authors use comparable features where possible and bring the training token counts closer together. They also attribute some of the observed performance difference to the greater morphological complexity of Serbian. The comparison consequently combines a measured difference in performance with an explanation based on corpus sparsity.

#### What the design leaves open

The matching procedure makes the classes more comparable on selected properties within a particular pool. The pool itself comes from eligible websites that publish enough rated content, largely use the chosen pronunciation, and cover movies beyond a single genre. The similarity of class totals and average lengths verifies aspects of balance within SerbMR. It does not establish population representativeness for Serbian movie reviews at large. The paper also allows the same-source condition to be relaxed, so matching is a preference subject to availability.

The labels encode review ratings after conversion to a common scale. That conversion supplies an operational definition of sentiment, but the paper does not independently validate whether ratings have the same meaning across websites or reviewers. Mirrored ratings are symmetrical on the chosen scale. Similar intensities of expressed praise and criticism are an aim of using that symmetry, instead of a property measured separately on the paired texts. Likewise, the term neutral describes a rating band in the benchmark. The proposed explanation involving mixed opinions is plausible within that definition, but the paper reports no separate annotation of mixed sentiment by which to test it directly.

The independent test shows better performance on the particular short comments used in the paper. Since both the training collection and the evaluated text format differ from those in internal cross-validation, internal and external accuracy cannot be used to measure the isolated effect of any particular shortcut. The external comparison itself is stronger on a narrower question. All the classifiers are judged on the same comment set, and matched training data leads to better results there. The study does not repeat that comparison across several independent review or comment collections, which would have allowed an assessment of how consistently the gain transfers.

The feature selection stages establish that some settings work better at specific points in the progression. Because later experiments inherit earlier choices, the paper does not test every interaction among feature counts, negation windows, stemmers, count weighting, and sequence lengths. The word optimal applies to the outcomes of this search and its selection criterion. Hyper-parameter tuning is nested, while the broader feature progression is reported through benchmark cross-validation. The study supplies no independent evaluation of every final feature configuration on the short comments.

The headline metric is accuracy. It permits direct comparison across systems on the same test, but it does not reveal which label pairs account for errors. In particular, the gap between binary and three-class results establishes that the tested systems achieve lower accuracy when the neutral class is included. It leaves open how frequently neutral reviews are called positive, how often they are called negative, and how often the introduction of the middle class changes decisions on the polar reviews. Those questions matter for assessing the authors' explanation of the NBSVM results.

Finally, the near match in training token counts for the English and Serbian comparison controls one dimension of the available evidence. Vocabulary composition, source characteristics, and implementation choices can still differ. The observed sparsity of Serbian features and the gains from stemming lend support to the authors' interpretation. The comparison does not isolate a language-wide effect of morphology on sentiment accuracy.

### What came after

The paper gives no account of subsequent studies using SerbMR or testing its matching procedure in another setting. The authors end by identifying two directions for follow-up. One is to apply their collection method in domains such as music, books, and products, where the available sources could produce a different relationship between ratings and writing style. The other is to study short texts in Serbian more directly. The short-comment experiment motivates that direction by showing that training-set selection still matters when document-level baselines are applied to a harder text format. Both directions are proposals in the paper, with their outcomes left open.

## Cite

Cite as Vuk Batanović, Boško Nikolić and Milan Milosavljević. 2016. Reliable Baselines for Sentiment Analysis in Resource-Limited Languages: The Serbian Movie Review Dataset. Proceedings of the Tenth International Conference on Language Resources and Evaluation (LREC'16).

The paper itself, not this page. BibTeX from the library's record of the work.

```bibtex
@inproceedings{batanovic2016reliable,
  title = {{Reliable Baselines for Sentiment Analysis in Resource-Limited Languages: The Serbian Movie Review Dataset}},
  author = {Vuk Batanović, Boško Nikolić and Milan Milosavljević},
  booktitle = {Proceedings of the Tenth International Conference on Language Resources and Evaluation (LREC'16)},
  year = {2016},
  url = {https://aclanthology.org/L16-1427/}
}
```

> 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)
