KanCMD: Kannada CodeMixed Dataset for Sentiment Analysis and Offensive Language Detection
Paper · 2020 · Adeep Hande, Ruba Priyadharshini and Bharathi Raja Chakravarthi
Summary
A YouTube comment can express approval in Kannada, insert an English phrase for emphasis, and write the Kannada words in Latin letters. To interpret it, a reader has to recognize the language through those changes and make separate judgments about the feeling expressed and any offense directed at a person or group. KanCMD gives researchers a way to study those judgments on the same material. It contains 7,671 comments drawn from 18 YouTube videos, with separate labels for sentiment analysis and offensive language detection. The comments come from discussions of film trailers and other topics, including a mobile app ban in India and the India–China border issue.
The sentiment labels distinguish positive, negative, mixed, and neutral expression. The offense labels distinguish comments without offense, comments with untargeted offense, and comments that direct offense at an individual, a group, or another target. Both tasks have an other-language category. A comment can qualify as Kannada when it uses either Kannada or Latin script. The authors collected judgments from a minimum of three annotators per comment. Their reported agreement, measured with Krippendorff’s alpha, was 0.73 for sentiment and 0.78 for offense.
The authors established separate baselines for the tasks using conventional classifiers. Logistic regression achieved the highest test macro F1, which gives each class equal weight, at 0.47 for sentiment and 0.43 for offense. Random forest had the highest sentiment test accuracy at 0.59. For offense, it shared the top test accuracy of 0.66 with logistic regression. The class scores show why the metric matters. On offense, random forest recovered a larger share of comments labeled free of offense, while logistic regression recovered more of several kinds of offense. For sentiment, positive comments were much easier for several methods to recover than comments expressing mixed feelings.
The shared comments make KanCMD a resource for studying whether training on one judgment can help with the other. The reported experiments establish what the classifiers can do when trained separately. They also identify where that starting point is weakest. Recognizing a common label, such as positive sentiment or text free of offense, can yield a respectable aggregate score while leaving substantial difficulty with the less common judgments that motivated the dataset.
Deep dive: KanCMD: Kannada CodeMixed Dataset for Sentiment Analysis and Offensive Language Detection
KanCMD pairs sentiment and offensive language labels for Kannada–English YouTube comments and tests how well simple classifiers recover them. · about 36 minutes to read
The problem and its context
Language and script in a single comment
The paper starts with the gap between the text encountered on a social platform and the text for which a natural language processing system has training examples. People use comments to respond to videos, events, and one another. The authors describe this writing as informal, sometimes using more than one language and sometimes using a script different from the language’s usual one. A resource based on edited Kannada prose would give examples of Kannada while leaving out much of that variation. The collection problem is therefore also a definition problem. What should count as relevant Kannada text when both writing systems and languages can change inside a post?
The paper uses code-mixing for the use of material from multiple languages in a communicative exchange, drawing on earlier work that treats mixing as something that can operate at different linguistic levels. For example, a writer can change languages between sentences. Within a sentence, words or expressions from one language can appear inside a construction organized by the other. A switch can also occur within a word, at the level of morphology, the way smaller meaningful parts form words. The paper reports seeing mixing between sentences, within sentences, and at the morphological level. It also describes comments that combine within-sentence and between-sentence mixing. One of its sources for the notion of mixing is Language Modeling for Code-Mixing.
Script adds a separate dimension. Kannada text can appear in Kannada script or be represented in Latin letters. A Kannada sentence written entirely with Latin letters can still be Kannada throughout. Conversely, script alone leaves room for borrowing or mixing. The authors describe comments with Kannada grammar and English vocabulary, comments with the opposite arrangement, and comments in Kannada script that insert English expressions. These patterns matter for a classifier that uses the visible forms of words and sequences. Two comments can communicate a similar reaction while sharing little of their surface wording, and one string of Latin letters can be insufficient to tell which language a writer is using.
Kannada is a Dravidian language that the paper situates primarily in Karnataka, in southern India. The authors describe it as morphologically rich and under-resourced for the work they wanted to do. Here, the relevant shortage concerns accessible examples of everyday Kannada social media writing with labels for specific tasks. A collection of bilingual words can help researchers determine which language a word belongs to. A collection annotated for sentiment can help determine how an entire comment reads. They answer different questions, even when the writing comes from a similar setting. The paper connects the shortage of resources for Kannada with the broader problem of building tools for low-resource languages.
Judging sentiment and judging offense
Sentiment analysis in this study asks what emotional attitude the words of a comment convey. A favorable statement can explicitly signal approval or give the reader an indirect clue. A negative comment can express disappointment or dislike. A comment that contains evidence of both requires a different judgment from a neutral one, where the annotator finds no evidence of the writer’s emotional state. A system needs to do more than detect whether evaluative words are present. It must learn which kinds of wording distinguish the categories as the annotators apply them.
Offensive language detection begins with a different question about the text. When the annotator finds offense or profanity, the annotation goes on to consider whether it is directed anywhere, and, if so, at what. The distinction matters because profanity can serve as an exclamation, while abuse can be directed towards a particular person or community. If the target is a situation, issue, organization, or event, the scheme has another category for it. The authors’ motivation includes the practical problem of identifying abuse in social media comments, where determining what is being attacked gives more information than a simple offense flag.
These questions share a possible source of evidence. Wording that signals anger or disapproval may help in interpreting abuse, and the way a writer addresses a target may help interpret their attitude. The definitions still allow the judgments to come apart. Criticism supplies grounds for a negative sentiment judgment even when its words supply no grounds for an offense label. A profane exclamation can raise an offense question before the reader knows whether it expresses praise or dissatisfaction. These are implications of the label definitions. The authors’ motivation for collecting both judgments is that shared textual cues might help a system learn, while the labels preserve the distinction between the two tasks.
Work the authors build on
The paper places sentiment analysis in a line of work that includes opinion mining on reviews and social platforms, the compilation of sentiment lexicons, and experiments with sequences of words as features. A sentiment lexicon associates words or expressions with evaluative meaning. A sequence feature can represent a short expression as a unit, giving a classifier access to some local context around a word. The authors describe a broader move toward neural approaches and note that Kannada sentiment analysis had seen comparatively limited progress. Their account includes earlier work on Kannada mobile product reviews and sentiments in Kannada web documents. Their discussion of sentiment lexicons points to Thumbs Up or Thumbs Down?.
There was also prior work specifically on mixed Kannada and English. The authors describe a language identification dataset that contains Kannada words, English words, and words with material from both. They cite a Kannada stance detection study that used sentence representations and experimented with logistic regression. Stance concerns the position that a writer takes, which can relate to sentiment without being the same annotation problem. The paper also discusses prior sentiment experiments on Kannada–English text with positive, negative, and neutral tags and distributed representations learned through neural methods. According to the authors, that Kannada dataset was difficult for other researchers to obtain. KanCMD addresses access to annotated material as well as the set of judgments researchers can study on it.
The authors put the Kannada examples alongside earlier reports of code-mixing and nonstandard script use on social media. Their precedents include English–Hindi Code Mixing in Facebook and a Hindi–English dataset for hate speech detection. The Kannada collection follows the use of YouTube comments in the Malayalam–English sentiment dataset. For the sentiment labels, it follows the approach in Corpus Creation for Code-Mixed Tamil–English Sentiment Analysis. These collections give the Kannada project precedents for going where people post mixed-language text and for treating varied expressions of sentiment as annotation decisions.
For offense, the authors point to shared tasks on identifying aggression and offensive posts and to the release of an offensive language dataset for Greek. Their own scheme follows work that asks whether an offensive post has a target and what kind of target it has. These precedents establish the task design in which KanCMD participates. The Kannada project applies that design to a collection where a reader must also decide whether Kannada is present and where the same comment carries a separate sentiment judgment. The relevant precedents are Benchmarking Aggression Identification in Social Media, Offensive Language Identification in Greek, and Predicting the Type and Target of Offensive Posts.
The method, step by step
Finding comments and defining the unit of analysis
The procedure starts with the videos. The authors used topic keywords to find 18 YouTube videos and collected their comments with a YouTube comment scraper. The collection ran from February to August 2020. The subjects included movie trailers, discussion of the mobile app ban in India, the India–China border issue, the Mahabharata, and a topic concerning transgender people. These are different reasons for viewers to comment. A trailer can invite reactions to the film or people associated with it, while a current event can invite judgments about public issues. The paper makes the sampling route clear at this level. Keywords lead to videos, and videos supply the comments.
The comment is the useful unit for understanding the paired data. The corpus records more sentences than posts, so a post can contain more than one sentence. This is consequential even for a short comment. A change of language across sentence boundaries is visible only if those sentences are kept together. Evidence for a label can also be distributed through the post. A writer can express approval in one clause or sentence and a reservation in another, and the sentiment category is defined to accommodate both. The guidelines describe what annotators look for in a comment, and the distribution and split counts are reported for the collected examples.
The collection and annotation stages solve different parts of the task. Finding a comment under a relevant video brings it into the pool. People reading the comment determine the judgments that go into the dataset. The availability of an other-language category in both schemes means the collection can represent that decision explicitly. The annotations then become the reference labels against which supervised text classification is evaluated. In this setting, supervised classification means learning from comments with assigned categories and applying that learning to comments held out for evaluation.
From YouTube comments to KanCMD benchmarks
The steps in order.
Assigning a sentiment label
The sentiment scheme asks annotators to look for evidence of the writer’s state in the wording. Evidence may be explicit, as in a direct expression of approval, or implicit, where the writer’s attitude is inferable from what they say. An annotator who finds positive evidence assigns the positive category when the comment expresses a positive state. The negative category is defined in the same way for a negative state. The categories describe what the comment conveys under the annotation rules. The authors use readers’ judgments of the written message as the basis for that decision.
Mixed feelings and neutrality involve different kinds of evidence. A mixed comment supplies clues to favorable and unfavorable feelings. Neutrality applies when the comment lacks a clue to the writer’s emotional state. Consider a post about a trailer that approves of one element and criticizes another. Under the scheme, an annotator has material to support a mixed judgment. A post that simply conveys information about the trailer could support a neutral judgment if its wording supplies no evaluative clue. These examples illustrate how the rules work. The paper defines the categories through the evidence for a feeling, including when that evidence has to be inferred.
Language eligibility provides a further outcome. The guidelines recognize Kannada in Kannada script and Kannada written in Latin script. The presence of English words in a Kannada comment is consistent with the purpose of the collection. The other-language category applies when the comment fails the Kannada criterion. This gives the sentiment benchmark a linguistic decision alongside the judgments about feeling. Where an example belongs to the other-language category, predicting positive, negative, mixed, or neutral would miss its reference label even if the system recognized an attitude expressed in that example.
There is a subtle distinction between an implicit cue and an ambiguous cue. An implicit cue can still provide enough evidence for a reader to infer an attitude. An ambiguous cue leaves room for readers to draw different conclusions, particularly if the tone depends on how they relate the words to what is being discussed. The annotation scheme asks a reader to make a discrete choice despite that possibility. This helps explain why the authors later discuss mixed feelings and neutrality as challenging judgments. They depend both on detecting an attitude and on deciding whether the evidence supports a particular kind or combination of attitudes.
Assigning an offense label
The offense scheme turns a hierarchy of decisions into a single label for each comment. The top distinction concerns the presence of offense or profanity. If the annotator finds neither, the comment receives the not-offensive label. If the comment contains offense, the next distinction is whether that language is aimed at a target. When it is undirected, the label is offensive untargeted. When a target is present, the final distinction is whether the attack is directed at an individual, a group, or an entity or matter of another kind.
The other-target category covers examples such as an organization, event, situation, or issue. Its place in the scheme matters. It is possible to identify a target clearly and still determine that the target belongs outside the individual and group categories. By comparison, untargeted offense is a judgment that the offensive expression has no such object. A reader trying to assign the label therefore has to understand the relation between the offensive words and the entities or subjects mentioned in the comment. The mere presence of a person or organization in the wording gives insufficient grounds for treating it as the target.
Other language is again a possible label. It is distinct from offensive targeted other, even though both labels use an everyday sense of the word “other.” The target category identifies a particular structure of offense in an eligible comment. The language category marks the outcome of the Kannada judgment. Predicting the former in place of the latter is a classification error of the same formal kind as confusing two categories of attack, but the interpretation is different. This distinction becomes useful when reading the results, because the classifiers generally do better at the other-language category than at several of the offense categories.
The hierarchy defines the annotation categories. The benchmark is described as a set of classifiers that predicts those categories for the task. In effect, the fine-grained label records the outcome of all the relevant decisions. An example labeled as an attack on an individual already implies that the annotator found offense and a target. A correct prediction for that class must recover the full label. A classifier gets no partial credit in the reported class metrics for recognizing that a comment is offensive while assigning it the wrong target category.
Collecting judgments and measuring agreement
The authors collected linguistic annotations through Google Forms. Each form was handled by at least three annotators and at most 5. The paper describes five annotators in total, with Kannada as their mother tongue and Karnataka as their home state. It records gender, education, and medium of schooling as characteristics of the group. English was the medium of schooling for most of them. That background is pertinent to a task in which the reader may have to interpret an English expression inside Kannada or recognize a Kannada expression written in Latin letters.
The authors warned the annotators that the comments could include abuse and offensive language and gave them the option to stop if the material became too disturbing. They also asked them to avoid letting their views about a person, situation, or event determine the judgment. The latter instruction is relevant to both tasks. An annotator must distinguish the writer’s evaluation from their own and identify the offense under the scheme even when they personally agree or disagree with what the comment is about.
To describe consistency across judgments, the paper reports Krippendorff’s alpha. This statistic measures agreement while accounting for how much disagreement would be expected by chance given the labels. The reported alpha is 0.73 for sentiment and 0.78 for offensive language identification. These are annotation statistics. They describe how consistently people applied the task definitions to the text, while the classifier scores describe how well a learned system recovered the reference categories. In particular, comparing the two alpha values does not tell a reader which specific distinction was hardest to make. The results for individual classes answer a different question about the predictions.
After annotation, the authors exported the form responses as CSV files and combined the responses into a single dataset. This produces the shared corpus on which the two distributions are reported. The paper gives a single reference category per task for the purpose of counting classes and evaluating predictions. Its description of the move from form responses to that reference is brief, so the published benchmark is most precisely understood in terms of those reported categories and counts.
Turning comments into inputs for the classifiers
The baseline experiments use conventional machine learning methods implemented with scikit-learn. For logistic regression, the authors represent the comment using TF-IDF values. The term frequency part reflects the occurrence of a feature in the text being represented. The inverse document frequency part makes a feature worth less when it occurs widely across documents. A distinctive expression can therefore receive more weight than a widespread expression, depending on how it is distributed. The classifier receives a vector of such numerical values for each comment.
The paper describes the logistic regression inputs as going up to 3 grams. An n-gram is a contiguous sequence of units. Here the feature range allows an individual term and sequences of neighboring terms to contribute. For instance, a local combination involving a sentiment word can supply evidence beyond the presence of the word by itself. This gives the classifier access to short patterns that cross a language switch if the sequence occurs in the data. The paper says the logistic regression approach is trained on KanCMD without pretrained word representations. It specifies the same inputs for the support vector machine and TF-IDF vectors for multinomial naive Bayes.
Logistic regression learns weights on the features that contribute to the choice of a class. The paper uses L2 regularization, a penalty that discourages large feature weights. With a vocabulary that includes different written forms and short sequences, individual features can have little evidence behind them. Regularization restrains how strongly such features can drive a prediction. The support vector machine also uses L2 regularization. Its principle is to find a separating boundary, described as a hyperplane, in the space of inputs. Though the two classifiers use the same stated features and both apply regularization, their objectives differ. The setup therefore allows an empirical comparison of the resulting decisions on the same tasks.
Multinomial naive Bayes combines evidence from the features using probabilities associated with the classes. The classifier’s assumptions let it factor the evidence from different features and use it to choose a class. A zero probability for a feature can dominate the calculation, which is why the authors specify Laplace smoothing. The paper gives the smoothing setting as follows.
α = 1
Here α is the additive smoothing parameter for multinomial naive Bayes. The equals sign sets it to 1, the amount used for Laplace smoothing. The purpose is to keep a feature with no observed occurrences for a class from receiving zero probability solely because of the training counts. This α is a classifier setting. Krippendorff’s alpha, used earlier, is a measure calculated from the annotation judgments.
The nearest-neighbor method takes a different approach. It classifies a comment by looking at nearby training examples in its input representation and using their labels. The authors list neighborhood sizes of 3, 4, 5, and 9. They give neighbors uniform weights, meaning that the examples selected for a vote have equal influence. The number of examples consulted changes the scope of that vote. A narrowly chosen neighborhood can respond to a close match, while a larger neighborhood allows more training labels to influence the outcome. The results give one set of nearest-neighbor scores per task.
A decision tree classifies by following a series of tests on the input. Each internal decision routes an example farther down the tree, and its final branch ends in a class prediction. The authors specify a maximum depth of 800 and a minimum of 5 samples for a split. They name Gini and entropy as criteria, both ways of judging the mixture of classes at a node when considering a split. A random forest combines predictions from multiple decision trees. The paper says it uses the same features for the forest and the individual tree. The corresponding results compare the tested implementations with the stated settings.
Separating the training tasks
The paper describes a partition into 768 test examples, 767 validation examples, and the remainder for training, with an analogous split for the offensive language task. Training examples provide the inputs and labels from which the classifier learns. The validation partition supplies a separate set on which candidate settings can be assessed. The test partition provides the examples used for the performance comparisons. The paper reports the chosen sizes and several settings considered in the experiments. It gives test scores for each classifier and task.
The same collected comments support both lines of supervision. A sentiment experiment takes the sentiment categories as its outcomes. An offensive language experiment takes the offense categories as its outcomes. In the paper, each benchmark learns separately. The design leaves scope for joint training because different labels can be attached to the same input. A joint approach would have to specify a way to share what is learned across tasks and compare its performance with training them independently. The separate baselines establish the comparison point for that question.
Experiments and results
How the comments and labels are distributed
The authors report 7,671 posts, 8,472 sentences, 64,997 tokens, and a vocabulary of 20,667. A token is a counted unit of text, while the vocabulary size counts distinct token forms. A often used form contributes many occurrences to the token total and one entry to the vocabulary. The dataset statistics table gives an average of 8 tokens per post. The surrounding prose associates that average with sentences, so the table is the clearest basis for identifying the denominator there. The counts show that the benchmark concerns short comments with a variety of surface forms, including the language and script variation the authors describe.
Positive is the largest sentiment category, with 3,518 comments in the full collection. Negative has 1,484. Other language accounts for 1,136, neutral for 842, and mixed feelings for 691. The distribution matters for learning and interpretation. Positive examples provide more chances for a classifier to see a particular word or phrase associated with the class. On the test split, positive has support of 363, negative 162, and mixed feelings 57. Neutral has 83 test examples, and other language has 103. A correct positive prediction therefore contributes to an overall accuracy score in a test set with many such opportunities. The class-level measures put that prediction in the context of the class it belongs to.
For offense, the distribution table gives 4,336 comments labeled not offensive. The paper’s prose gives 4338 for the same category, so the full-corpus count differs between its two accounts. The table lists 1,863 examples under other language, 626 as attacks on individuals, and 416 as attacks on groups. The untargeted category has 278, and the other-target category has 152. The fact that the other-language full-corpus count is 1,863 for offense and 1,136 for sentiment means the reported language labels have different distributions across the tasks, even though both guidelines use Kannada as the criterion of interest.
In the offense test results, not offensive has support of 417 and other language has 185. The targeted individual class has 75 examples, targeted group has 44, untargeted offense has 33, and targeted other has 14. The not-offensive class is thus well represented in the test set, while the detailed categories for offense draw on much smaller samples. Test support is unchanged across classifiers within each task. It specifies the number of reference examples on which each class’s recall is based and the weight of that class in the weighted averages.
What the reported scores mean
Accuracy is the share of test comments assigned their reference label. Precision for a particular class asks how often a prediction of that class is correct. Recall asks how many reference examples of that class the classifier retrieves. These measurements have different denominators. A classifier can get high precision by predicting a category only when there is strong evidence, and get low recall because it leaves most of the category’s examples to other labels. High recall can likewise accompany low precision if a classifier uses the category for many examples that belong elsewhere.
F1 combines precision and recall in a harmonic mean, a way of averaging that is pulled toward the lower value. This matters when a classifier is very selective with a rare class. The precision can look impressive on its own, but F1 still reflects the many examples of that class left unrecovered. Support gives an essential scale for interpreting all three quantities. A class with few reference examples can show a striking score based on very limited coverage, and the precision, recall, and F1 are all easier to read with that class’s support beside them.
Macro averaging first computes the measure for each class and then gives the class results equal influence. Weighted averaging also begins with class results, then weighs them by class support. In the offense task, a targeted-other example matters to accuracy as a single test prediction. The targeted-other class matters to macro F1 as a category with the same influence as not offensive. The usefulness of a classifier depends on which question matters. A benchmark intended to assess whether a system can recognize all the offense categories needs the class results or a measure that reflects them. Accuracy still answers the separate question of how frequently the chosen label is right under the test distribution.
The other-language class is part of those calculations in both tasks. Macro F1 gives it the same weight as each of the substantive sentiment or offense categories. Weighted F1 reflects how frequently it occurs among the examples for that task. As a result, a better score at detecting other-language comments can improve the task’s aggregate, just as better recognition of negative sentiment or targeted offense can. The paper reports the class scores as well as the aggregates, which makes it possible to see which improvement the benchmark records.
Sentiment across the baselines
Logistic regression has the highest sentiment macro F1 on the 768 test comments. The comparison includes a forest that classifies more comments correctly in aggregate and a support vector machine whose performance is concentrated entirely in the largest class.
KanCMD sentiment test macro F1 across classifiers
Logistic regression leads when sentiment classes receive equal weight.
The numbers
| System or setting | Macro F1 |
|---|---|
| Logistic regression (this paper) | 0.47 |
| Random forest | 0.43 |
| Decision tree | 0.41 |
| Multinomial naive Bayes | 0.31 |
| K-nearest neighbors | 0.30 |
| Support vector machine | 0.13 |
Random forest leads sentiment test accuracy with 0.59. Logistic regression and multinomial naive Bayes each reach 0.57, followed by the decision tree at 0.54, nearest neighbors at 0.52, and the support vector machine at 0.47. The shared accuracy of logistic regression and naive Bayes is useful to examine in detail. The former has a much more even pattern of recognition over the categories, while the latter has especially high recall for positive sentiment. A count of all correct answers can give the same outcome for both because that positive class accounts for so many test examples.
For random forest, positive sentiment has recall of 0.87 and F1 of 0.70. The corresponding recall of logistic regression is 0.69, with F1 also at 0.70. Precision for that class is higher with logistic regression, at 0.70, than with random forest, at 0.59. Thus the shared class F1 is reached through different balances of precision and recall. Random forest returns the positive label more readily and finds more of the reference positives. Logistic regression’s positive predictions are more often right. Negative class F1 is 0.57 for random forest and 0.55 for logistic regression, so the highest macro F1 does not require logistic regression to lead on the two most frequent polarities.
Mixed and neutral results make the broader advantages of logistic regression clearer. Logistic regression has sentiment test F1 of 0.25 for mixed feelings and 0.37 for neutral. Random forest has 0.11 and 0.27, respectively. The decision tree reaches 0.20 for mixed feelings and 0.21 for neutral. These values remain below the scores these classifiers attain for positive sentiment. The absolute difficulty and the relative gain are both part of the result. Logistic regression provides the best equal-class average in the comparison, while positive and negative are still more reliably recovered than the labels that require recognizing both kinds of feeling or the absence of either.
The results for naive Bayes give a particularly clear illustration of precision and recall. On mixed feelings, its test precision is 1.00 and recall is 0.02, resulting in F1 of 0.03. When it uses the label, it is reported as correct, yet it rarely recovers a mixed example. For neutral sentiment it has precision of 0.75, recall of 0.04, and F1 of 0.07. Compare those figures with its positive test recall of 0.99 and positive F1 of 0.70. The broad pattern is one of strong reliance on the common positive category, alongside much more selective assignment of several other labels.
Nearest neighbors also heavily favors positive predictions. It has positive recall of 0.91 and negative recall of 0.10 on the sentiment test. Its other-language F1 of 0.47 shows that its performance varies considerably among smaller classes. The corresponding other-language F1 is 0.50 for logistic regression and 0.52 for random forest. A classifier’s ability to recognize those examples can coexist with limited recognition of mixed or neutral sentiment. The breakdown helps locate the weakness in the emotional categories instead of attributing every error to the presence of more than one language.
The support vector machine’s sentiment results go farther in the same direction. Positive recall is 1.00, and every other sentiment class has recall of 0.00. Positive F1 is 0.64, and each of the other class F1 scores is 0.00. With 363 test comments carrying the positive label, this concentration accounts for the contrast between the non-zero accuracy and the weak macro result. The evaluation captures a prediction rule that returns the majority class under the tested setup. The score says little about distinctions among the remaining categories because the classifier fails to recover them.
Offensive language across the baselines
The offense task likewise gives logistic regression the strongest macro F1, with the decision tree and random forest the next strongest by that measure. When looks at each class count equally, the ranking places the decision tree ahead of the forest.
KanCMD offensive language test macro F1 across classifiers
Logistic regression has the best balance of class performance on offense.
The numbers
| System or setting | Macro F1 |
|---|---|
| Logistic regression (this paper) | 0.43 |
| Decision tree | 0.37 |
| Random forest | 0.34 |
| K-nearest neighbors | 0.27 |
| Multinomial naive Bayes | 0.26 |
| Support vector machine | 0.12 |
Offense test accuracy is 0.66 for both logistic regression and random forest. Multinomial naive Bayes gives 0.62, nearest neighbors 0.61, the decision tree 0.60, and the support vector machine 0.55. The weighted offense F1 of logistic regression is 0.66, compared with 0.61 for random forest and 0.58 for the decision tree. The accuracy tie between the leading classifiers leaves considerable differences in which errors they make. Comparing the per-class results shows how a forest that recovers many not-offensive comments reaches the same accuracy as a classifier that has broader coverage of some offense categories.
For the not-offensive class, random forest has recall of 0.89, compared with 0.76 for logistic regression. Logistic regression has precision of 0.77, while random forest has 0.65. Their F1 values for this class are 0.77 and 0.75, respectively. An offense screening system can make a consequential mistake by assigning not offensive to an abusive comment. These precision and recall measures do not enumerate every such confusion, but they show how frequently the classifiers use the label correctly and how much of the reference class they recover.
The strongest detailed offense category for logistic regression is attacks on individuals. It has test F1 of 0.61 and recall of 0.59 for that label. The decision tree gives F1 of 0.54, and random forest gives 0.47. The class with the next closest target distinction, attacks on groups, is appreciably harder in the reported results. Its test F1 is 0.24 for logistic regression, 0.22 for the decision tree, and 0.14 for random forest. A system that can identify part of the individual-target class therefore still has limited coverage of abuse aimed at a group. The difference could reflect class frequency, the wording of the attacks, or difficulty determining the target. The results measure the performance gap among labels under the tested setup.
The smallest target class gives another illustration of precision and recall. Random forest has precision of 1.00 for offensive targeted other but recall of 0.06 and F1 of 0.11. The class’s test support is 14. Logistic regression has precision of 0.22 and recall of 0.29, giving F1 of 0.25. This is a case where one classifier’s rare predictions are more selective and the other yields broader retrieval at the cost of more incorrect assignments. The support makes it especially important to read the scores as outcomes on the KanCMD split.
Untargeted offense is also difficult. The decision tree reports test F1 of 0.13, ahead of logistic regression at 0.04 and random forest at 0.00. The tree’s recall is 0.09 and logistic regression’s is 0.03. Even the stronger result in this comparison captures a small share of the reference examples. Other language is easier for the leading classifiers. Logistic regression reaches offense test F1 of 0.68 there, and random forest reaches 0.60. With support of 185, its effect on accuracy and weighted F1 is larger than that of any individual targeted offense category.
Naive Bayes and nearest neighbors both recover much of the not-offensive class, with test recall of 0.98 and 0.93, respectively. Their test recall for untargeted offense is 0.00. For attacks aimed at individuals, naive Bayes gets test F1 of 0.48 and nearest neighbors gets 0.30. For group-targeted offense, nearest neighbors reaches F1 of 0.16, while naive Bayes reports 0.00. These different patterns are one reason their similar aggregate scores are best read alongside the individual categories. The support vector machine again concentrates on the largest class. It obtains recall of 1.00 for not offensive and 0.00 for all other offense labels.
Comparing the tasks under different metrics
The authors describe sentiment as the task on which the classifiers did better and suggest that its class distribution is one reason. The report supports that comparison in macro F1. Every tested classifier has a higher macro F1 for sentiment than for offense. Logistic regression reaches 0.47 on sentiment and 0.43 on offense, while random forest reaches 0.43 and 0.34. That comparison is about the performance averaged over classes within each task. The offense average includes several distinctions among types of targets and gives each its own weight.
The accuracy ordering across tasks goes in the opposite direction. Random forest has sentiment test accuracy of 0.59 and offense test accuracy of 0.66. Logistic regression has sentiment accuracy of 0.57 and offense accuracy of 0.66. The other classifiers follow the same ordering by accuracy. The most common offense class has greater test support than the most common sentiment class, and several classifiers do well on that common offense label. It is therefore possible to score more correct predictions overall on offense and still show poorer performance across its categories. The paper’s conclusion about relative difficulty is most informative when tied to the metric and to the kinds of errors it counts.
What the ablations show
The paper reports no component ablation. Its analyses compare classifiers, contrast the class distributions for the tasks, and break down performance by label. These comparisons allow several specific conclusions about behavior on KanCMD. A controlled ablation would hold the rest of the procedure fixed while changing the use of a feature, training signal, or design choice. For example, the reported experiments establish a difference between logistic regression and the support vector machine with the same stated input representation. The contribution of each n-gram length would require a comparison that varies that input choice while keeping the classifier and evaluation fixed.
Comparing learners with the same stated features
The most direct comparison of this kind is between logistic regression and the support vector machine. Both use the stated TF-IDF inputs and L2 regularization, yet the classifiers distribute predictions quite differently. On sentiment, the support vector machine recovers the positive class at recall of 1.00 and every other class at recall of 0.00. Logistic regression has lower positive recall and non-zero recall for every other class. The offense results show the same broad pattern. The support vector machine goes entirely to the not-offensive class, and logistic regression recovers examples from every class. The comparison shows that using the same inputs leaves room for large differences in how the learner uses them under the tested settings.
The authors regard the support vector machine’s result as unusually poor. Its per-class results make the observed failure precise. This is a loss of label coverage, visible even before averaging. The results are compatible with several explanations involving the training objective, its configuration, and the class distribution. Because the benchmark gives one performance breakdown for the tested configuration, the result establishes how that configuration behaved. The table doesn't identify the setting or training condition responsible for the collapse into the majority class.
The tree and forest comparison also uses the same stated features. On offense, the forest has better accuracy, while the single tree has stronger macro F1. The tree finds more of the untargeted cases by recall and has higher F1 for group-targeted offense. The forest does better on the not-offensive class by F1 and recall, and it has higher F1 on other language. For this pair, aggregate accuracy and coverage of less common categories favor different choices. Combining trees was associated with better overall accuracy in these runs. The class results qualify what that improvement means for the fine distinctions in the annotation scheme.
What the class results reveal about difficulty
The strongest repeated observation is that the classifiers tend to recover the common labels more readily. Several methods attain high recall for positive sentiment, and several do the same for not-offensive comments. The rare classes often have low recall even when precision appears strong. Naive Bayes on mixed sentiment and random forest on the other offense target make that pattern especially visible. Those classifiers sometimes make a correct rare-label prediction. Their test recall shows that they do so for only a small share of the relevant comments.
The authors suggest that imbalanced distributions contribute to the results. The task counts support the premise that class frequencies differ, and the class scores show that high support often accompanies better recognition. There is still meaningful variation among categories with limited support. The paper’s decision tree has higher F1 on untargeted offense than on the least common targeted category, while logistic regression does better on the latter than on untargeted offense. For these two learners, the relative difficulty changes with the classifier. Frequency is relevant to the amount of training evidence, and these outcomes show the value of looking at each category once learners have been trained.
The authors also point to the difficulty annotators face in separating mixed feelings and neutrality. The distinction requires a reader to look for two kinds of evaluative evidence in the first case and an absence of such evidence in the second. The fact that the benchmark learners often do poorly on both is consistent with the authors’ interpretation. The available agreement scores are task-level values. A reader can use them to compare overall consistency, while explanations of the particular class errors would need the disagreements for those classes and examples of the errors themselves.
For offense, a classifier must recognize a phrase as abusive or profane and then identify what it is directed at, if anything. The stronger results on individual-target attacks show that the ranking is uneven even inside the offense categories. The class scores also distinguish recognizing an individual target from recognizing untargeted use, where the absence of a target is part of the definition. An error analysis of the underlying comments could determine whether the weak results arise mainly at the initial offense decision, at the decision about whether a target exists, or at the classification of the target. The paper’s per-class precision and recall locate the vulnerable categories, while the route taken by individual mistakes remains open.
What the comparisons say about shared training
The two tasks offer a natural basis for testing shared training because their labels describe different aspects of the same comments. The baselines instead establish the outcomes of independent training. Comparing the two scores of logistic regression, for instance, tells a reader how that learner fares under two sets of labels. It cannot serve as a comparison of joint and independent training. Such a comparison would need the same held-out labels, a joint approach, and its separately trained counterpart. It would also need per-class results, because a shared approach could improve the most common labels while making some of the weaker classes harder to detect.
The paper consequently supports a narrow but useful interpretation of its experiments. A reader can identify how the benchmark classifiers differ in accuracy, in equal-class performance, and in the balance of precision and recall for particular decisions. The score distributions also show where an evaluation could gain detail by measuring language eligibility, offense presence, or target recognition separately. The paper treats the shared label design as preparation for studying transfer between the tasks, and its experiments supply reference outcomes against which that transfer could be tested.
Limitations
Limits the authors identify
The authors characterize the baseline results as modest, especially for the less successful sentiment and offense categories. They single out mixed feelings and neutrality as difficult for annotators and relate some of the classification difficulty to the nature of those categories. For offense, they emphasize weak results beyond the better recognized labels. Their discussion of the class distributions proposes imbalance as a reason why the tasks respond differently to the tested classifiers. The wording of that explanation matters. It is an interpretation of the results and the distribution, with room for differences in wording, annotation, and classifier behavior to contribute.
The stated research aim is to encourage work on multitask learning for Kannada and other under-resourced languages. The reported experiments are a benchmark for separate training. The potential benefit from shared sentiment and offense supervision therefore remains a research objective. A reader can reproduce the broad comparison being made from the results and can see which labels a joint approach would need to improve. Whether sharing knowledge between tasks yields that improvement is outside the measured results.
Limits visible in the sampling and annotation
KanCMD samples YouTube comments through a set of selected videos and topic keywords. Its data support claims about the comments gathered that way, during the collection interval. A test split drawn from that corpus gives a measurement under the corpus’s topic mix and writing conventions. Performance on another platform, on later discussions, or on an entirely different set of video topics would require a separate measurement. The use of topics matters to interpretation because a classifier could learn associations between recurrent topic language and labels. A test designed around unseen videos or subjects would address how far performance transfers independently of those associations. The paper describes the split sizes without identifying a video-held-out or topic-held-out design.
The annotation also reflects the judgments of a small group of Kannada-speaking readers with the background the paper reports. Their agreement values give evidence of consistency within that exercise. They leave open the degree of agreement a wider pool of Kannada speakers might reach, including readers with different schooling or experiences of social media language. The paper reports the number of annotators per form and the aggregate agreement values. Its account gives little detail about how disagreements were resolved into the reference category for each task. This limits how closely a reader can connect a particular class score to uncertainty in the human judgments behind it.
The results pool comments across the reported kinds of language and script use. A score for mixed feelings, for example, combines whatever forms of mixing and writing occur in that class of the test set. The paper’s observations about sentence-level switches, within-word mixing, and Kannada in Latin letters give reasons to examine those groups separately. With the reported scores alone, it remains uncertain which forms the classifiers handle most successfully. The same applies to the other-language decisions, which have different counts in the tasks in spite of the shared Kannada criterion. Aggregate class counts cannot establish which comments were treated differently or how disagreements about language eligibility were resolved.
Limits visible in the evaluations
The class metrics are for a single reported test partition for each task. Test support of 14 for offensive targeted other and 33 for untargeted offense gives comparatively little evidence about those decisions. The paper presents scores for that partition without uncertainty estimates across resampled or repeated splits. A small numerical lead on an infrequent class is best read as a descriptive result for this test. The high-precision, low-recall outcomes also give reason to check both quantities whenever a rare category looks strong on one measure alone.
The results measure exact category recovery. A system that predicts an attack on a group when the reference calls it an attack on an individual has recognized the presence of offense and made a targeting error. One that calls the same comment not offensive has missed offense at an earlier decision. Both are errors in the reported class evaluation. The per-class scores show whether each label is recovered, while they leave the distribution of errors between alternative labels unspecified. A separate result for binary offense detection or a table of which labels were confused would support a more precise account of these failure modes.
Several parts of the experimental description also affect how precisely the benchmark can be reconstructed. The authors provide the broad feature scheme for logistic regression, the support vector machine, and naive Bayes, and specify several classifier settings. They list alternative neighborhood sizes and tree split criteria and report a final set of test results. Their account gives limited detail on choices such as how features were tokenized across scripts and which candidate settings yielded each row. This matters particularly when interpreting the poor support vector machine result, since the paper documents one outcome for the tested setup and offers little evidence about how it would respond to a change in configuration.
Finally, the full-corpus not-offensive count is inconsistent between the prose and the distribution table, and the average token count is described with different units in prose and in the statistics table. The test supports attached to the classifier results are separately reported and give the denominators needed to interpret those comparisons. Keeping the corpus figures distinct from test support avoids carrying an inconsistency in the descriptive statistics into the performance results.
What came after
Later papers that cite KanCMD range from new dataset construction to shared-task evaluation and classification methods. Their subjects show how far the broader interest in annotated social language extends beyond the original pairing of sentiment and offense. The direct links established by these works are citations. Their titles and task descriptions identify where their concerns overlap with KanCMD, while leaving the operational details of any reuse of its comments, labels, or training setup unspecified.
The clearest parallel in dataset design is a multilingual resource for detecting hope speech in the context of equality, diversity, and inclusion. It makes a different communicative quality the object of annotation. KanCMD separates emotional attitude from abusive language, whereas the later dataset organizes its examples around the detection of hope speech. The continuity is in treating a socially meaningful judgment as something that needs a corpus constructed for that purpose. The label name or an existing sentiment score alone would give little basis for learning the new distinction. That parallel is visible in HopeEDI: A Multilingual Hope Speech Detection Dataset.
The shared-task findings carry forward the offense side of the problem. The task concerns offensive language in Tamil, Malayalam, and Kannada, placing the Kannada classification problem alongside corresponding work in the other languages. The scope makes structured evaluation across languages part of the research activity. KanCMD had established examples and baselines for a Kannada setting and connected them to precedents in Tamil and Malayalam sentiment annotation. The later shared task makes offensive language identification the common focus across the named languages. Its findings are reported in Findings of the Shared Task on Offensive Language Identification.
A system paper from the same workshop setting addresses offensive language identification and meme classification across Tamil, Malayalam, and Kannada. Its relation to KanCMD can be seen in the treatment of offense recognition as a classification task for these languages. It brings a separate meme classification problem into its scope as well. This is a different pairing of tasks from KanCMD’s sentiment and offense labels on the same text comments. The later work belongs to the system-building side of the shared-task effort, while KanCMD’s baselines were developed to characterize its own newly annotated corpus. The system paper is IIITK at DravidianLangTech EACL2021.
The later ByteBreaker paper applies XLM-RoBERTa Large to writing style classification, using sliding-window chunking and top-K mean pooling. The named approach cuts the input into windows and combines selected window outputs through averaging. Its central prediction problem is writing style, a different target for supervised classification from either of KanCMD’s judgments. The connection established by the citation is therefore broader than the shared offense task. It places the earlier Kannada resource among the precedents for later classification work at DravidianLangTech. The method and its target are identified in ByteBreaker at DravidianLangTech 2026.
Cite
Cite as Adeep Hande, Ruba Priyadharshini and Bharathi Raja Chakravarthi. 2020. KanCMD: Kannada CodeMixed Dataset for Sentiment Analysis and Offensive Language Detection. Proceedings of the Third Workshop on Computational Modeling of People's Opinions, Personality, and Emotion's in Social Media.
@inproceedings{hande2020kancmd,
title = {{KanCMD: Kannada CodeMixed Dataset for Sentiment Analysis and Offensive Language Detection}},
author = {Adeep Hande, Ruba Priyadharshini and Bharathi Raja Chakravarthi},
booktitle = {Proceedings of the Third Workshop on Computational Modeling of People's Opinions, Personality, and Emotion's in Social Media},
year = {2020},
url = {https://aclanthology.org/2020.peoples-1.6/}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/hande-2020-kancmd-kannada-codemixed-dataset-sentiment/