Comparison of Short-Text Sentiment Analysis Methods for Croatian
Paper · 2017 · Leon Rotim and Jan Šnajder
Summary
A short opinion gives a computer little text to work with. In Croatian, the same word can also appear with different endings, and an informal tweet may supply none of the grammatical context that helps a reader interpret a careful review. Leon Rotim and Jan Šnajder study how to predict the sentiment of these short texts from examples that people have already labeled. They ask whether word embeddings, which learn how words are used from a large collection of text, offer an advantage over string kernels, which compare character patterns directly. They also test how much either approach gains over simple features based on words or pieces of words. Sentiment & emotion
All the approaches use a support vector machine to predict sentiment, so the main differences lie in how the text is represented and how the classifier compares examples. In the embedding approach, the authors train word vectors on a Croatian web corpus and average the available vectors for each short text. The string kernels compare continuous character sequences or allow the matching characters to occur with gaps. The simpler baselines use ordinary words, words reduced to dictionary forms or stems, or short strings of adjacent characters. The authors evaluate these alternatives on passages from computer game reviews, tweets about The Voice of Croatia, and tweets on general topics. They select settings within the training portion of each evaluation split and score them on held-out examples.
The best embedding configurations lead on the game reviews and the general-topic tweets. On game reviews, averaged dictionary-form embeddings with a cosine kernel reach 0.822, compared with 0.781 for the best string kernel and 0.765 for the best baseline. On general-topic tweets, word-form embeddings with a radial basis function kernel reach 0.565, compared with 0.517 for the strongest baseline and 0.506 for the strongest string kernel. On the television tweets, the spectrum string kernel has the highest score, 0.722, and the paper reports that its advantage is not statistically significant. All these scores average the F1 results for positive and negative sentiment, including on the tweet datasets where neutral is also a possible label.
Stemming gives the strongest simple baseline on every dataset. The authors find little benefit from the more elaborate step of reducing words to dictionary forms, and they release the game-review spans for further research. The comparisons support a qualified conclusion about resources. Embeddings trained on additional Croatian text can help, but their advantage depends on the dataset and the kernel. Direct string comparison is competitive when a word-vector corpus or a stemmer is unavailable, particularly against a baseline that uses words as they appear.
Deep dive: Comparison of Short-Text Sentiment Analysis Methods for Croatian
A study of Croatian game reviews and tweets compares word embeddings, string kernels, and simple word features for short-text sentiment classification. · about 33 minutes to read
The problem and its context
What a short text gives the classifier
The paper treats sentiment as a prediction about the opinion expressed in a piece of text. A system receives a passage or a message and assigns a polarity label. Positive and negative are the labels of interest throughout the study, and the Twitter collections also allow neutral. This is a text classification problem because the decision is made for the input item as a whole. The general definition in the paper also allows sentiment to be directed at a particular entity. In these experiments, the target for prediction is the assigned label of the span or tweet.
The authors situate the task in work on user reviews and microblogs, with applications ranging from the study of public opinion to marketing and finance. Such applications make large numbers of short opinions worth analyzing, but the messages themselves supply uneven evidence. A text can express an opinion without spelling out its reasoning. Informal spelling and grammar may make familiar expressions less recognizable. Figurative language can also complicate the relationship between an expression and the opinion it conveys. The paper cites earlier work on figurative Twitter messages and irony in reviews to frame that difficulty. SemEval-2015 Task 11: Sentiment Analysis of Figurative Language in Twitter
The Croatian setting adds a specific challenge. The authors describe Croatian as a highly inflected South Slavic language and cite earlier work connecting its inflection to lower classification accuracy. In a representation that gives each observed word form its own feature, occurrences with different endings provide separate pieces of evidence. A labeled example containing one form may therefore contribute nothing to a feature for another form. This matters in short texts because a document may have few alternative clues when a useful form is rare or missing from training. Grouping forms by their stems or dictionary entries is one way to share that evidence. Recognizing recurring sequences of characters is another. Morphology
The comparison is about the evidence a small representation makes available to a supervised classifier. A word inventory records recognizable units. Character patterns can survive some changes to those units. A vector learned from recurring contexts can give related words nearby representations even when their spellings are different. Each option draws on a different kind of information, and those differences affect the resources needed to build the system. The authors' question is whether the additional work of learning vectors from a large corpus produces enough benefit to justify using them instead of a method that starts from the character strings in the labeled examples.
Why compare these particular approaches?
The paper describes earlier supervised approaches that used carefully designed collections of features. These could include properties of the text's surface form, information from sentiment lexicons, and syntactic information. Such feature sets can express distinctions that a plain count of words cannot. They also require choices about which linguistic clues to encode, and those choices can depend on the type of text. The paper investigates alternatives that need comparatively little feature design. Recognizing Contextual Polarity
One line of prior work described by the authors builds a sentiment prediction from syntactic structure. The recursive approaches of Socher and colleagues use parse trees to put smaller expressions together into a representation of a sentence. The paper also cites work that uses kernels over trees of grammatical dependencies. Both approaches draw on information about which words or expressions are related. That information is valuable when the effect of a word depends on the other words it combines with. Rotim and Šnajder emphasize the difficulty of obtaining reliable parses for informal writing and the awkwardness of extending sentence-level methods to fragments that cross sentence boundaries. Parsing · Semantic Compositionality through Recursive Matrix-Vector Spaces · Socher and colleagues’ sentiment treebank study
The paper also describes prior work that used learned vectors for sentiment. Tang and colleagues and Maas and colleagues learned word representations specifically for recognizing polarity. Le and Mikolov are cited for results on short and long texts in English using representations for larger units of text. The Croatian experiment draws on the broad idea that a learned vector can support sentiment classification, while making a narrower choice about composition. It looks up word vectors and averages them. The sentiment labels enter when training the classifier on those averages. This keeps the comparison centered on an inexpensive way of turning existing word-level information into evidence about a short text. Learning Sentiment-Specific Word Embedding · Learning Word Vectors for Sentiment Analysis · Distributed Representations of Sentences and Documents
String kernels offered a second route away from full syntactic analysis. The authors cite earlier success applying them to Chinese reviews. The appeal in the Croatian comparison is that the object being compared can stay a string. A kernel can look for shared character patterns without asking a tokenizer to identify words or a morphological tool to decide which forms belong together. It still needs labeled examples for the sentiment decision. What it avoids is the separate corpus used to learn word vectors, along with the linguistic preprocessing needed by some of the word-based representations.
The Croatian comparisons that preceded it
The authors describe a small body of earlier work on Croatian sentiment. One study applied a recursive matrix-vector approach to the polarity of phrases. Another investigated sentiment towards particular aspects of the things discussed in user reviews and used a richer feature set. The multilingual Twitter study they cite included Croatian and used conventional bag-of-words features. These are different points of comparison. A phrase-level study addresses how a local expression conveys polarity. An aspect-oriented study distinguishes what in a review the opinion concerns. The Twitter study supplies a precedent for representing examples through ordinary word features. None is presented as having made the same direct comparison between averaged embeddings, string similarities and simple word features.
The authors also place short informal text classification in the context of the SemEval Twitter evaluations. Those campaigns had already established short messages as a setting for testing sentiment classifiers. They also supply the precedent for the Croatian study's choice to emphasize positive and negative F1. This history matters because the authors are not proposing a new definition of sentiment or a new evaluation task. Their contribution is comparative. They bring representations with different requirements into a shared experiment and examine how those choices behave on Croatian texts drawn from different settings. SemEval-2016 Task 4: Sentiment Analysis in Twitter
The method, step by step
A shared classifier with different ways to read the text
The authors start with text whose sentiment labels have been assigned by people. They hold the classification algorithm fixed across the comparisons by using a support vector machine, or SVM. The SVM learns a decision boundary from labeled training examples. In a linear configuration, the decision depends on a weighted combination of the features it receives. A kernel specifies similarities between examples and can let the SVM learn a boundary that is nonlinear in the original representation. The paper uses LIBLINEAR for linear configurations and LIBSVM for nonlinear ones. Machine learning
The input to that classifier changes across approaches. The bag-of-words baselines use a feature inventory. The embedding configurations reduce a short text to an average of word vectors, then compare those averages. The string kernels use similarities between the text strings themselves. When reading the results, it helps to keep the representation separate from the kernel. Switching from words to stems changes what the features stand for. Switching from a linear to a cosine kernel on the same word vectors changes how points in that representation are compared.
From labeled Croatian texts to held-out sentiment scores
The steps in order.
The branches in this procedure make different demands on the raw text. Stemming and dictionary-form lookup operate on word units. Vector averaging needs both those units and a corresponding embedding vocabulary. String comparison takes characters as its input. These alternatives all end at the same kind of supervised decision, but they determine which examples will appear similar along the way. This is where the authors expect differences in handling short, morphologically varied, and informal texts.
Finding words and grouping their forms
For approaches based on words, the authors use the Croatian version of Google's SyntaxNet to split text into tokens. Tokenization determines which portions of the original string count as units for the word-based representation. Its use here concerns those boundaries. The sentiment classifier does not need a syntactic tree for each text. The authors apply the same preprocessing choices across the datasets and keep stopwords, the frequent words that some text classification pipelines remove before building features.
The paper compares two kinds of morphological normalization. Lemmatization maps a word form to its lemma, the dictionary form under which related inflections can be grouped. For Croatian, the authors use the CST lemmatizer described by Agić and colleagues. They report its published lemmatization accuracy as 97%. That figure concerns the tool's word-form analysis. Its usefulness for sentiment is assessed separately through held-out classification results. A tool can be accurate at returning dictionary forms and still change little about the evidence an SVM uses to predict polarity. Croatian and Serbian lemmatization and tagging
Stemming reduces related forms by applying simpler rules to their shapes. The Croatian stemmer used in the study removes inflectional suffixes from nouns and adjectives. Its output can group forms even when the resulting stem is not a dictionary word. This is sufficient for a feature representation if the grouped forms tend to provide useful evidence about the same class. In this application, the relevant comparison is whether the grouping yields better sentiment predictions, a different criterion from whether a linguist would select the same base form.
The alternatives offer different compromises. Keeping the original forms retains distinctions visible in the message. Using lemmas lets different inflections count under the same feature when the lemmatizer identifies them as forms of the same word. Stemming tries to recover useful overlap with a smaller set of rules. The experiments let the consequences of these decisions appear twice, though with different comparisons in each family. The bag-of-words baselines include words, lemmas and stems. The embedding results show word-form and lemma conditions.
Turning words and character fragments into baseline features
The paper evaluates four bag-of-words baselines. For each input, the representation records evidence about items in a feature vocabulary. With ordinary words, each retained form is a possible feature. With lemmas or stems, the corresponding normalized unit takes its place. Since the representation is a bag, it drops the original order of the word tokens. A linear SVM can learn that some features favor a polarity label, but a feature for a word supplies no location telling the classifier which nearby expression it modified.
The remaining baseline builds a vocabulary of character n-grams. An n-gram is a sequence of a specified length, and in this setting the units are adjacent characters. The authors combine 2-, 3-, 4-, and 5-grams in one feature set. A feature can capture a piece of a word that recurs across differently inflected forms. The same mechanism can register a distinctive character sequence even when the entire word is rare. Each individual feature still requires an exact match to a local string.
The item inventories are filtered by frequency. The authors remove word, lemma and stem features that occur fewer than two times in a dataset, and they remove character n-grams that occur fewer than six times. This makes the feature spaces depend on the material available and the unit being counted. In the character representation, a single text can contribute many overlapping candidates over the range of lengths used. Filtering those candidates more aggressively keeps very infrequent strings out of the vocabulary. The paper reports feature-vector dimensions after applying these thresholds.
All these baselines use a linear kernel. Their purpose is broader than setting a minimum score for a new method to beat. The raw-word configuration asks what the classifier can learn from the surface vocabulary. Lemmas and stems ask whether pooling related forms is helpful with the same linear setup. Character n-grams ask how far explicit pieces of strings can go on their own. The n-gram condition is especially relevant to the string kernels. Both can exploit recurring sequences of characters, but the baseline conjoins a specified set of lengths in an explicit, frequency-filtered vocabulary, while the string comparison takes its features from the kernel's matching rule.
Learning vectors from a Croatian web corpus
The embedding procedure starts before the sentiment classifier sees the labeled texts. The authors train their vectors on fhrWaC, a filtered Croatian web corpus. They use word2vec with the skip-gram objective, which learns from the relationship between a word and its surrounding context. The result associates a vocabulary item with a dense vector. These vectors represent information drawn from patterns of use in the corpus. During sentiment training, the classifier can use that information to treat words with related vectors more similarly than a vocabulary of independent word features would. Distributional semantics · Efficient Estimation of Word Representations in Vector Space
The word vectors have 300 dimensions. The skip-gram context window is set to 5, which controls the region used to find contextual evidence, and the negative sampling parameter is also 5. Negative sampling uses contrasting examples during vector training, allowing the training procedure to distinguish observed context relationships from sampled alternatives. The word2vec run uses no hierarchical softmax. These are settings for learning the word vectors from the corpus. The sentiment labels in the review and Twitter datasets are used in the later supervised step.
To represent a complete span or tweet, the authors look up vectors for its units and take their average. They leave out units for which they have no vector. That decision means the representation of a text depends on the part of it that the embedding vocabulary covers. A word form with no entry makes no contribution to the mean. If lemmatization replaces it with a form having an entry, that representation can use it, although the paper does not report how often this occurs. The results compare averaging the vectors for words in their original forms with averaging vectors in the lemma condition.
Averaging gives the classifier a vector of the same size for every text, regardless of its length. It also retains no record of the order in which the vectors occurred. The authors motivate this procedure with earlier findings about some aspects of meaning being recoverable through simple combinations of word vectors. In the Croatian experiments, the question is whether the resulting average contains enough evidence for a sentiment decision. The average itself contains no separate operation for finding which expression a word modifies or which opinion is the main point of a passage. Distributed Representations of Words and Phrases · Universal Paraphrastic Sentence Embeddings
Comparing the averaged vectors
The authors try a linear kernel, a radial basis function kernel, and a cosine kernel on the averaged embeddings. The linear configuration permits a direct test of whether the averages separate polarity labels with a linear decision boundary. The radial basis function, or RBF, kernel lets the classifier use a nonlinear relationship based on how close examples lie in the vector space. Its parameter γ controls the scale of that relationship. The cosine kernel uses the angle between vectors, taking their lengths into account by dividing the inner product by the product of those lengths, then transforming the resulting similarity.
CK(x, y) = [(1 + ⟨x, y⟩ / (‖x‖‖y‖)) / 2]ᵅ
Here CK names the cosine kernel. The vectors x and y are the averages for the two texts being compared. The brackets ⟨x, y⟩ denote their inner product, which combines corresponding coordinates. The expressions ‖x‖ and ‖y‖ give the vectors' lengths. Their product is the denominator that removes overall vector magnitude from the cosine calculation. Adding 1 and dividing by 2 shifts and rescales that similarity. The superscript ᵅ denotes the power α, which the authors tune when selecting settings for this kernel.
The distinction between the averaging operation and the similarity operation is important. The same words contribute to the same average regardless of which kernel is selected afterwards. A cosine comparison treats direction as the basis for similarity, while the RBF comparison depends on distance at a selected scale. A gain from one of these kernels therefore tells the reader something about how the representation works with the classifier. It supplies no new information about the sequence of words or the part of the web corpus used to train each vector.
Comparing character strings
The string-kernel branch starts from a different idea about what makes two texts similar. Rather than combining learned word coordinates, the kernel compares the character patterns that the texts contain. It can compute a similarity corresponding to a space with many possible sequences without constructing that feature inventory by hand. The authors calculate these kernels with the Harry string similarity tool. They use a subsequence kernel, abbreviated SSK, and a spectrum kernel, abbreviated SK.
The subsequence kernel can register the same characters in the same order even when there are intervening characters in the original text. A match with gaps stretches across a wider part of the string than a contiguous occurrence of the same sequence. The kernel can give those wider matches less weight. This offers a way of letting texts share evidence through patterns that survive some intervening variation while favoring matches whose characters remain close together.
ϕᵤ(s) = ∑ᵢ:ᵤ₌ₛ[ᵢ] λˡ⁽ⁱ⁾
Here s is the input string and u is the particular character subsequence being considered. The feature value ϕᵤ(s) adds up the contributions of occurrences of u in s. The index vector i gives the positions of one occurrence, and s[i] is the sequence of characters read at those positions in order. The sum ∑ runs over the vectors i for which s[i] is equal to u, the condition written beneath the sum. The function l(i), written in the exponent, measures the length spanned by that occurrence. The weight parameter λ is at most 1. A value below 1 gives a smaller contribution to an occurrence with a larger span.
Kₙ(s, t) = ∑ᵤ∈Σⁿ ⟨ϕᵤ(s), ϕᵤ(t)⟩
Here Kₙ is the subsequence kernel evaluated at length setting n, and s and t are the two strings. The paper describes n as the maximum subsequence length of interest and writes the sum over Σⁿ, the set of strings of length n over the character alphabet Σ. The variable u ranges over that set, as indicated by ∈. The angle brackets combine the corresponding feature values for u in the two strings. At a given u those values are scalar weights, so their contribution is their product. The sum ∑ combines that evidence across the character sequences considered.
For the spectrum kernel, the authors describe the matching rule as a special case. The index positions must be adjacent, so a match cannot skip over characters. The weight λ is set to 1, leaving occurrences unpenalized by a decay factor. The remaining length setting controls which contiguous patterns supply evidence. The contrast with SSK is about how much flexibility the matching rule permits. SSK can recognize ordered sequences that appear with intervening characters. SK counts evidence from uninterrupted occurrences. Which is more useful depends on whether the extra matches from gaps contribute to the sentiment decision or introduce overlap between texts with different labels.
Selecting settings without using the test fold
The paper evaluates the classifiers using nested cross-validation. In cross-validation, different portions of a dataset take turns serving as held-out data. The nesting gives settings selection and final scoring separate roles. The outer loop reserves a test fold. Within the rest of the data, an inner loop compares settings by training and validating on further subdivisions. The setting chosen there is used for the classifier evaluated on the outer test fold. The outer loop has 10 folds, and the inner loop has 5.
The authors search a grid of settings, meaning that candidate values are tried in specified combinations. Their account names C and γ for the RBF kernel. C governs the SVM's tradeoff between fitting the labeled training examples and keeping the decision boundary regular. The authors also search λ and n for the subsequence kernel, n for the spectrum kernel, and α for the cosine kernel. These parameters govern different parts of the procedure. Some control how a classifier fits examples, while others change the similarity presented to it in the first place.
Setting selection on the inner folds matters for comparing methods with different options. A kernel can look promising when judged on the same examples used to decide how it should be configured. Holding the outer fold apart gives the selected setting a further test. The resulting scores describe learning and selection within each data collection. All the systems are judged by the same primary sentiment metric, so the results compare entire configurations that reach the held-out labels by different routes.
Experiments and results
Three collections with different kinds of evidence
The game-review dataset, GR, consists of spans taken from longer computer game reviews. The total is 1858, with 826 positive spans and 1032 negative spans. The spans came from annotations identifying passages that expressed sentiment, so the input to classification is a selected passage. It can be smaller than a sentence or extend across sentence boundaries. Three annotators contributed labels, and the final span annotation was determined by majority vote at the token level. The reviews largely use edited, grammatical prose. GR has an average of 7.97 words per segment and a type–token ratio of 0.35, the highest reported across the collections. The ratio compares distinct word forms with the total number of word occurrences, so it summarizes one aspect of lexical variety.
The domain-specific Twitter dataset, TD, contains 2967 tweets about The Voice of Croatia. Its distribution is 2091 positive, 607 negative and 269 neutral. Three people annotated the messages, and the tweet's final label comes from their majority vote. The authors report Fleiss' kappa of 0.721, a measure of agreement among annotators that adjusts for chance agreement. The mean tweet length is 11.12 words and the type–token ratio is 0.18. The texts can be informal or ungrammatical, yet they share a subject area, and the positive class is much larger than either of the other classes. Linguistic annotation
The general-topic Twitter dataset, TG, contains 7999 tweets. It has 2258 positive, 3883 negative and 1858 neutral examples. A single annotator supplied its labels. The average length of 22.04 words is the largest of the collections, and its type–token ratio is 0.21. The authors characterize both tweet collections as containing largely informal text. TG also spans a variety of topics, widening the range of subjects on which the classifier must recognize polarity. The experiment therefore includes longer texts without assuming that they provide a more consistent set of sentiment clues.
These differences matter to the interpretation of the scores. GR consists of selected expressions of positive or negative opinion in reviews. TD and TG are tweet collections with a neutral option, and they differ in topic range, label balance and annotation procedure. The comparison makes the same representation choices face different conditions. Cross-dataset differences in scores cannot isolate which condition caused them, because the other properties of the datasets change alongside the one being considered. The performance ranking within a dataset is the more direct comparison of the tested configurations.
The score the authors optimize and report
The evaluation follows a SemEval convention cited in the paper. It computes F1 for the positive class and F1 for the negative class and averages those values. For each class, precision is the share of predictions of that class that are correct, while recall is the share of examples belonging to that class that the classifier finds. F1 combines precision and recall through their harmonic mean. Each polarity label supplies its own F1 to the reported average. The score therefore gives positive and negative sentiment equal standing even when their frequencies differ substantially. SemEval-2013 Task 2: Twitter Sentiment
Neutral remains a possible prediction in TD and TG. A neutral tweet predicted as positive can lower positive precision, and a positive tweet predicted as neutral can lower positive recall. The analogous relationships hold for negative sentiment. Thus neutral examples can affect the reported score even though neutral F1 has no term of its own in the average. That makes the metric suitable for the paper's emphasis on polar opinions, while leaving open how well any configuration recognizes the neutral class in its own right.
The scores come from the outer cross-validation evaluation after settings have been selected inside it. For tests of score differences, the authors use a t-test with p<0.05 and apply a Bonferroni correction where multiple comparisons warrant it. That correction makes the significance criterion more stringent when a collection of comparisons provides more opportunities for an apparently unusual difference. The score table marks certain entries, but the accompanying prose gives accounts of significance that do not fully agree. The numerical rankings and the claims supported by those rankings therefore need to be read alongside the paper's statements about the tests. Evaluation & benchmarks
Game reviews
The GR results give the clearest ordering of the best configurations from each family. The best embedding result comes from averaging lemmas and using the cosine kernel. The spectrum kernel is the stronger of the string methods, and stemming provides the highest score among the linear baselines. The chart compares these peaks and shows how the raw-word baseline fares in the same experiment.
Positive and negative F1 on Croatian game-review spans
Lemma embeddings with the cosine kernel lead the spectrum kernel and the strongest bag-of-words baseline.
The numbers
| System or setting | F1 |
|---|---|
| Bag of words, word forms | 0.712 |
| Bag of words, stems | 0.765 |
| Spectrum string kernel | 0.781 |
| Lemma embeddings, cosine kernel (this paper) | 0.822 |
Proceeding from the original word forms to stems helps the simple baseline substantially in the observed scores. The character n-gram baseline reaches 0.714, and the lemma baseline reaches 0.741. Stemming makes the strongest improvement of these alternative feature sets. The subsequence kernel achieves 0.778, close to the spectrum kernel. The fact that the two string scores lie close together matters when interpreting the string result. They agree broadly in standing relative to the strongest baseline and the best embedding score on GR.
The embedding results on this dataset are consistently strong. The word-form embedding with the linear kernel scores 0.801, which already exceeds the scores for both string kernels and every bag-of-words baseline. RBF on word forms scores 0.807, and the word-form cosine configuration reaches 0.812. In the lemma condition, using the linear kernel gives 0.798 and using RBF gives 0.806. The best result with lemmas comes with cosine similarity. In other words, the approach's standing on GR does not hinge completely on the top configuration, while the choice of normalization and kernel still determines which configuration leads.
Domain-specific tweets
On TD, the spectrum kernel records the highest score. The stem baseline stays close, and the highest score for the embedding family is shared by several configurations. The authors explicitly report that the string kernel's lead on this dataset is not statistically significant.
Positive and negative F1 on tweets about The Voice of Croatia
The spectrum kernel leads, with stemming and the best embedding configurations close behind.
The numbers
| System or setting | F1 |
|---|---|
| Bag of words, word forms | 0.673 |
| Bag of words, stems | 0.716 |
| Word embeddings, cosine kernel | 0.715 |
| Subsequence string kernel | 0.718 |
| Spectrum string kernel (this paper) | 0.722 |
The best embedding score of 0.715 also occurs in the lemma condition with RBF. At the precision shown in the paper, the two settings share the highest TD embedding result. With word forms, the embedding scores are 0.653 with linear and 0.693 with RBF, alongside the cosine value shown in the chart. With lemmas, the scores are 0.655 with linear and 0.711 with cosine, alongside the shared peak with RBF. The poor showing of the linear embedding settings on TD makes the comparison more informative than a ranking of the family peaks alone. The same procedure for averaging words yields quite different results when the kernel changes.
The linear TD baseline using character n-grams scores 0.690, and the lemma baseline scores 0.711. Both normalized word-feature conditions exceed the result from word forms. The best string result is therefore more persuasive as evidence that direct character similarity is competitive on this collection than as evidence of an advantage over a strong normalized baseline. Within the TD experiment, the choice between an embedding and a string kernel makes less difference at their best observed settings than it does when the embeddings are paired with the linear kernel.
General-topic tweets
On TG, the strongest result is for word-form embeddings with RBF. Cosine on the same word representation reaches 0.560. The best bag-of-words baseline uses stems and scores above either string-kernel configuration. This dataset is particularly important to the paper's comparison because the ranking below the winner differs from the one on game reviews.
Positive and negative F1 on general-topic Croatian tweets
RBF on averaged word embeddings leads, and the stem baseline places above both string kernels.
The numbers
| System or setting | F1 |
|---|---|
| Bag of words, word forms | 0.485 |
| Bag of words, character n-grams | 0.509 |
| Bag of words, stems | 0.517 |
| Spectrum string kernel | 0.496 |
| Subsequence string kernel | 0.506 |
| Word embeddings, cosine kernel | 0.560 |
| Word embeddings, RBF kernel (this paper) | 0.565 |
The remaining TG baseline, using lemmas, reaches 0.505. The word-form embeddings with a linear kernel score 0.550. Lemma embeddings give 0.536 with linear, 0.543 with RBF and 0.546 with cosine. The overall embedding lead on TG thus appears under each of the tested kernel types when ordinary word forms are used. The RBF condition determines the highest reported score. The string comparison has a different outcome. Allowing gaps raises the string-kernel score above the contiguous spectrum result, but that gain still puts the subsequence kernel below the baselines using stems and explicit character n-grams.
TG has the lowest scores for the best configurations among the collections. The authors suggest that informality, the neutral option, broad topic coverage, and the use of a single annotator can contribute to the difficulty. The longer average length and larger collection size coexist with these other differences. The experiments show the final classification outcomes under each collection's conditions. They do not separate the effect of receiving more words per example from the effects of the broader subject matter and the different labels.
What the significance marks support
The paper marks the GR lemma-and-cosine score of 0.822 and the TG word-form-and-RBF score of 0.565 with its significance symbol. Its discussion emphasizes the advantage of embeddings on those collections, although it describes cosine as the leading choice more broadly than the TG ranking warrants. TG's best result is the RBF configuration. The general finding about the embedding family is consistent with the scored entries. The exact ordering of the embedding kernels is best taken from the entries themselves.
There is also a conflict concerning the string kernels. The results prose groups GR and TG together in stating an advantage for embeddings and string kernels over bag-of-words baselines. On TG, the string scores fall below the stem baseline in the table. The discussion later says the string kernels did not significantly improve on the best baselines and emphasizes their gains over the raw-word baseline instead. The table supports a numerical gain for the best string configuration over raw words on each collection, alongside the weaker showing against stems. The paper reports significant improvements over raw words on two datasets without laying out the full pairwise tests. The evidence is clearest when the particular baseline is named.
What the ablations show
How much comes from changing the words?
The paper uses controlled comparisons among representations and kernels instead of removing pieces from a single sentiment system. The word-feature baselines supply the most direct comparison of normalization choices. They retain the linear classifier and change the feature unit. On GR, TD and TG, the highest baseline score comes from stems. The evidence therefore favors simple morphological grouping over keeping each original form distinct within this particular family of classifiers.
Lemmatization also improves the linear word-feature baseline relative to original forms on all the collections. Its effects are easy to misread if the comparison starts from the strongest result instead. The scores support two different statements. A dictionary-form representation provides a better baseline than raw word forms here, and a simpler stem representation provides a still better one. The authors' conclusion about the limited usefulness of lemmatization is a comparison against alternatives already available to them, especially stemming. It does not imply that replacing raw forms with lemmas had zero effect.
The character n-gram comparison further qualifies the interpretation. On GR and TD, lemmas score above the explicit character fragments. On TG, the character n-gram baseline scores 0.509 and the lemma baseline scores 0.505. The relative value of using a dictionary form and using adjacent fragments therefore varies with the data. Both alternatives can share evidence across some variations in spelling or inflection. The results report which feature spaces lead to better polarity predictions, without identifying which forms or fragments were responsible for the gains.
How much comes from changing the kernel?
The embedding experiments vary the kernel while keeping the type of averaged representation the same. For original word forms on GR, the ordering is linear, RBF, then cosine. On TD, cosine also gives the best result for original-form embeddings, but the lemma condition peaks with RBF. On TG, RBF leads on original-form vectors and cosine leads on lemma vectors. Every dataset has an embedding configuration that benefits from a nonlinear kernel relative to the corresponding linear comparison. The preferred nonlinear kernel changes with the text collection and lexical representation.
Changing from words to lemmas within each kernel shows a second interaction. On GR, the advantage from lemmatization occurs with cosine, which rises from 0.812 for word forms to 0.822 for lemmas. The GR linear and RBF scores move slightly in the opposite direction. On TD, lemmatization raises the RBF result from 0.693 to 0.715 and lowers the cosine result from 0.715 to 0.711. The best score in the embedding family on TD can thus be reached with either lexical representation, depending on the kernel. These are comparisons of complete configurations within a shared evaluation, so they establish which choices work well together on the data.
TG is more uniform on this point. Each of the reported embedding kernels scores higher with original word forms than with lemmas. That pattern differs from the word-feature baseline, whose lemma version improves on raw words. Sharing an explicit feature among inflected forms and replacing the unit used to retrieve a corpus vector are distinct operations. A morphological transformation may change which word vectors are available and which points are being averaged. The paper does not trace those changes item by item, so the scores show the consequence of choosing the lemma condition without identifying the mechanism behind it.
What matching with gaps adds
The spectrum and subsequence comparisons test whether stronger flexibility in character matching helps in this application. The spectrum kernel scores 0.781 on GR and 0.722 on TD, above the matching subsequence scores of 0.778 and 0.718. On TG the ordering changes, with the subsequence kernel reaching 0.506 while the spectrum kernel reaches 0.496. This reversal is evidence that permitting gaps can help the string approach on some data. It does not support a general gain from using the more flexible match.
The explicit character n-gram baseline offers an additional point of reference. On GR and TD, either string kernel yields a higher reported score than the n-gram baseline. On TG, the n-gram score is above both string scores. This comparison cannot attribute a gain solely to implicit rather than explicit character features. The explicit baseline combines a specified range of lengths, discards infrequent patterns, and uses a linear kernel. The string kernels choose their length settings through validation and differ in which patterns they count. Taken together, these trials show what the alternatives deliver as configured, and how a connection at the level of character patterns can lead to different outcomes when the full representation changes.
The practical argument for string kernels in the paper rests mainly on their resource requirements and their standing relative to raw words. A workflow without an embedding corpus or stemmer can still compare strings and fit an SVM to labeled examples. Across GR and TD the best string scores even sit above the stem baseline in the reported table, though the discussion does not claim a significant advantage over the strongest baselines. On TG the stem baseline has the numerical advantage. The comparison is valuable precisely because raw-word and stem features set different bars for the usefulness of an additional representation.
Limitations
Limits the authors identify
The authors associate the lower scores on the tweets with the character of those datasets. They describe the messages as informal and frequently ungrammatical, in contrast to the mostly edited review prose. They also point to the extra label in the tweet evaluation. Its presence changes the classification decisions, even with a metric that averages positive and negative F1 only. For TG, the authors propose two further explanations for the weaker performance. Its messages range across topics, and the labels come from a single annotator. They present these explanations as plausible contributors, without an experiment that varies them independently.
Text quality also enters the authors' interpretation of lemmatization. They suggest that noisy informal writing may help explain why the more complex normalization step has limited benefits. The stated 97% accuracy is a reported property of the lemmatizer from prior work. The paper assesses the effect of applying it to sentiment classification, and the authors do not present a fresh measure of lemmatization accuracy on the tweets. The lemmatization result is therefore informative about using this tool in these pipelines. It offers no direct estimate of the extent to which the tool mishandles informal writing.
The authors report that they make the game-review dataset publicly available. They withhold the two Twitter datasets because of Twitter's terms of use. This creates an asymmetry in what another researcher can inspect from the released data. The GR spans can support follow-up work on the strongest results under the review setup. The tweet findings concern specific labeled collections which the paper describes, but which the authors do not distribute alongside the review material.
What the setup lets a reader infer
The evaluation measures performance within each collection. Its held-out folds provide tests on examples from that collection after the inner loop selects settings. There is no reported experiment that trains on the game reviews and tests on tweets, or trains on tweets about the television competition and tests on general-topic messages. The scores therefore support comparisons among methods under the observed dataset conditions. Generalization across genres and topics would require a separate evaluation in which the training and test conditions differed in the way being claimed.
The design also makes broad comparisons of dataset difficulty hard to interpret. GR contains passages selected for expressing polarity. A system tested on those spans is given the location of an opinion-bearing expression. It is not asked to locate such passages in the longer reviews. The tweet systems instead receive whole messages which can be labeled neutral. Text selection, style, annotation and the decision task all change across that boundary. The stronger review scores fit the authors' explanation about edited prose and fewer sentiment categories, but no isolated effect size for either property follows from the experiments.
The sentiment labels have different sources of uncertainty. On TD, Fleiss' kappa provides an agreement measure for the annotators before the use of majority vote. On TG, a single annotator defines the target and there is no corresponding estimate of agreement. Differences in F1 cannot tell whether TG is harder because of the varieties of opinion expressed, disagreement that another annotator would have had, or the way the representations respond to broader topic coverage. A classification error is defined against the assigned label. There is no analysis of disputed or ambiguous cases explaining which part of the reported error is associated with annotation.
The metric has a related limit. The positive and negative F1 scores are averaged, and the paper presents that average in its results table. This is enough to compare the chosen primary measure, but the table does not reveal how each approach balances precision and recall within a class, or how its positive performance compares with its negative performance. A configuration can reach a similar average through different patterns of prediction. In the Twitter experiments, neutral affects the positive and negative scores through errors across class boundaries. Its own accuracy is not recoverable from the published average.
What the comparisons leave unexplained
Averaged embeddings perform well on GR and TG, but the study does not trace their improvements back to particular corpus evidence. The paper does not report how many word forms or lemmas lack a vector on each dataset. It gives the rule for omitting uncovered units but no detailed account of examples for which none of the tokens has a vector. Without coverage figures, the reader cannot determine whether performance changes with lemmatization because more units are included, because the retrieved vectors are more useful, or because other properties of the selected representations change. Likewise, the experiments do not vary the embedding corpus or the amount of text used to learn the vectors.
The results also do not establish that useful lexical averaging is the same as recovering the structure of an opinion. The classifier can obtain strong aggregate scores from words that correlate with polarity. Averaging gives it no explicit information about which words appeared next to each other or how they were syntactically related. The string kernels retain local or ordered character evidence in their matching rules, but they do not explicitly identify what an opinion is about. The prior work on irony and figurative language motivates studying informal text. The experiments report no separate evaluation of those phenomena, so neither family can be credited with a specific improvement on them.
The bag-of-words vocabulary filtering is described in terms of occurrence frequencies in each dataset. The evaluation description specifies where settings selection occurs, but it does not detail when the frequency-based vocabularies are rebuilt relative to each fold. That leaves a procedural question about reproducing the baselines. In a fold-based implementation, choosing the vocabulary from training examples alone and choosing it once using the full collection can produce different inventories. The report also does not give the full settings grids or all the fold-level scores underlying the tests. These gaps limit the precision with which a reader can reconstruct the evaluated configurations and assess variability.
The numerical table is more informative than the paper's broad wording about significance in some places. The TG string score fails to beat the best baseline in the reported ranking, and the paper does not show the full pairwise test results that would resolve the inconsistencies in its prose. The available statistics support saying which configurations score higher under the evaluation and which results the paper marks as significant. They give a less complete account of how stable all the small differences are. On TD in particular, a top score can indicate competitive performance without establishing that the order would persist on another sample.
Finally, the methods differ in their prerequisites, but the paper measures predictive performance rather than setup costs. An embedding requires an additional corpus and vector training. A stem baseline relies on the Croatian stemmer. A string kernel avoids those dependencies while still computing similarities and fitting a supervised classifier. The paper does not report comparable runtimes, memory use or development effort. Its conclusion about the appeal of a string kernel without corpus or stemming resources is grounded in what the methods require, while their relative cost at larger scales remains outside the measurements.
What came after
Improving Sentiment Classification for the Slovak Language cites Rotim and Šnajder and addresses sentiment classification for Slovak. The citation connects the Croatian experiment to a later study concerned with improving classification in another language. The Croatian paper supplies a concrete point of comparison for that research problem. It evaluates word forms, morphological normalization and character similarity under the same supervised procedure and shows how their relative performance can change between collections of short texts.
The Slovak study's title and citation establish that connection at the level of the task. They do not establish whether it reused the Croatian representations, adopted the evaluation procedure, or tested the same explanation for gains from normalization. In particular, the Croatian results say how the tested alternatives behave with the Croatian data, tools and corpus used in the experiment. The later citation shows that the comparison was relevant to work on sentiment classification in Slovak, while an implementation or replication claim would require details about that later experiment.
Cite
Cite as Leon Rotim and Jan Šnajder. 2017. Comparison of Short-Text Sentiment Analysis Methods for Croatian. Proceedings of the 6th Workshop on Balto-Slavic Natural Language Processing.
@inproceedings{rotim2017comparison,
title = {{Comparison of Short-Text Sentiment Analysis Methods for Croatian}},
author = {Leon Rotim and Jan Šnajder},
booktitle = {Proceedings of the 6th Workshop on Balto-Slavic Natural Language Processing},
year = {2017},
doi = {10.18653/v1/w17-1411},
url = {https://doi.org/10.18653/v1/w17-1411}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/rotim-2017-comparison-short-text-sentiment-analysis/