Elamur Research

Social Media Data Analysis for Malayalam YouTube Comments: Sentiment Analysis and Emotion Detection using ML and DL Models

Paper · 2023 · Abeera V P, Sachin Kumar and Soman K P

Summary

A Malayalam YouTube comment can convey approval or disapproval, express a feeling, or do both. Turning those judgments into a task a computer can learn requires examples that people have already labeled. The authors start by collecting comments from a range of YouTube videos and organizing two classification tasks. The sentiment task assigns a comment to Positive, Negative, or Neutral. The emotion task asks a more specific question within a narrower set of comments: does the text express happiness or sadness? Both tasks concern what readers can identify in the comment.

The authors collected 7,500 comments. They used 3,064 manually labeled comments for sentiment and selected 817 Happy and Sad comments from a broader emotion annotation effort. For sentiment, they compared classifiers that work with weighted word features with recurrent neural networks, which can process words in sequence. They tested the recurrent networks with two ways of representing the text. The published emotion comparison uses weighted word features and the same set of conventional classifiers as the sentiment comparison.

On the sentiment test set of 613 comments, a multilayer perceptron classifier and a nearest-neighbor classifier using 15 neighbors shared the highest reported accuracy, 54.32 on the paper’s percentage scale. The strongest recurrent result for accuracy was 54.21% from a gated recurrent unit with a text-to-sequence representation. An LSTM led the recurrent group that used Word2Vec, at 52.40%. The recurrent rankings also changed when the authors looked at F1, which combines precision and recall. In the two-class emotion experiment, the multilayer perceptron had the highest accuracy, 81.71%, on a test set of 164 comments.

The study provides an account of how the authors assembled labeled examples for Malayalam YouTube comments and what several classifiers achieved on those examples. Its clearest comparison is between systems evaluated on the same task with the same kind of text representation. The sentiment tables place several approaches close together in reported accuracy and give different rankings under other metrics. The emotion result applies to the selected Happy and Sad comments. The broader annotation effort included several other categories, and the authors identify the small number of examples available for individual categories as the reason for narrowing the experiment. Sentiment & emotion

Deep dive: Social Media Data Analysis for Malayalam YouTube Comments: Sentiment Analysis and Emotion Detection using ML and DL Models

A study of how classifiers identify positive, negative, and neutral sentiment, and distinguish Happy from Sad, in Malayalam YouTube comments. · about 31 minutes to read

The problem and its context

From a public comment to a classification task

A comment is an individual response to a video. A collection of comments can give researchers or content creators a view of how people respond across videos, but using it that way requires some means of organizing what people wrote. The paper considers organization by sentiment and by emotion. It places both within social media analysis, where the material is written by users and the analyst works from the language they chose to use. The authors mention applications such as understanding audience preferences, studying engagement, and informing recommendations. Their experiment starts with the more basic question of whether classifiers can assign labels to individual comments.

Sentiment, in the paper’s sense, is the polarity of an expression. A positive label marks favorable sentiment, a negative label marks unfavorable sentiment, and a neutral label accounts for comments assigned neither polarity. These are judgments about the text as a whole. Emotion classification starts from a different set of meanings. A label such as Sad indicates a kind of feeling. The paper’s background discusses a broader range, including anger, fear, and surprise. Which of those distinctions a classifier can be tested on depends on which labels have been assigned to enough examples.

That difference shapes the study from the beginning. A three-way sentiment task needs a way for annotators to make the neutral judgment alongside the two polar judgments. A Happy–Sad experiment needs examples readers have already placed into those specific emotion categories. A text can receive a sentiment judgment without supplying a clear example of either target emotion. Accordingly, the paper describes separate labeling efforts and builds a separate evaluation for each task. The broader emotion categories describe the annotation effort, while the reported emotion experiment asks a binary question. Text classification

Why the language and the platform matter

The authors describe Malayalam as a Dravidian language spoken predominantly in Kerala. They identify its grammatical characteristics and the cultural context of expression as factors that make sentiment and emotion difficult to infer. Their immediate obstacle is the scarcity of annotated Malayalam text suitable for the work. A collection of unlabeled YouTube comments gives them material to analyze, while a collection with human judgments gives them a way to train a classifier and decide whether its predictions match the target categories. Gathering and assigning those judgments is therefore part of the research problem.

The literature reviewed in the paper includes work on Malayalam tweets and sentences, alongside studies involving code-mixed social media text. Code-mixed text uses material from more than one language. The review also mentions earlier uses of YouTube comments in multilingual and code-mixed work. The gap the authors identify concerns the emphasis of that earlier research. Much of it addresses other domains or particular multilingual settings, leaving room for a study organized around sentiment and emotion in Malayalam YouTube comments. The earlier studies establish relevant methods and make clear why examples from a specific setting matter. Low-resource languages

Even within social media, changing the material changes what a classification result measures. A study of tweets supplies evidence about its own labels and samples. A study of comments on videos has another collection procedure and another population of texts. The paper’s choice to assemble examples from YouTube lets it ask the question inside that setting. Its review supplies the motivation for borrowing methods from related tasks, while the local annotation supplies the judgments against which those methods are checked.

Approaches the authors draw on

The paper describes several routes to sentiment analysis. A rule-based approach assigns judgments from patterns specified in advance. A lexicon-based approach relies on a vocabulary with associations already attached to words, such as positive or negative polarity. A supervised classifier learns from documents that carry labels. Under that approach, the people organizing the study specify the categories and supply examples. The learning procedure then finds patterns in those examples and uses them to assign categories to new texts.

For the supervised approach, a further choice concerns how the text reaches the classifier. A feature-based method takes measurements from the words and represents the comment with those measurements. The authors’ review includes Malayalam tweet work using individual-word features and sentiment information from a lexicon, with attention to negation. Work discussed in the same review uses approaches such as support vector machines and random forests. This line of research makes the feature representation an explicit part of the task. It also gives the authors a reason to compare several learning procedures on the same type of input. Machine learning

The paper also reviews neural approaches. It discusses recurrent networks, which can carry information forward as they read a sequence, and convolutional networks, which can capture patterns in local regions of text. Earlier sentiment studies in the review include combinations of convolutional and recurrent components. Other work it describes compares directions of recurrence or uses pretrained transformer systems. The literature thus contains variation in both the representation of a comment and the procedure used to recognize a label. Those choices help explain why the paper compares a conventional feature-based group with a recurrent group and then varies the text representation within the recurrent group.

Another strand of work in the review concerns learning related tasks together. The paper describes research involving sentiment and offensive-language identification in code-mixed Dravidian data, where the authors of the earlier work compared learning multiple tasks together with learning them separately. That work illustrates a different way to use labels. The Malayalam YouTube study defines its sentiment and emotion targets independently and reports separate results. The earlier study is relevant because it shows that the same platform or language can support several kinds of classification, each requiring a decision about which judgments to collect.

The review extends beyond sentiment to show the range of questions researchers have asked about social media text. Hindi–English emotion work supplies a precedent for labeling emotions in code-mixed material. Research on Malayalam tweets examines grammatical categories such as parts of speech. Studies on other languages classify sarcasm, humor, or offensive expression. That range matters here because several labels used in the paper’s broader emotion annotation, including Sarcasm and Humour, describe kinds of expression that can themselves be the target of a social media study. The paper’s final choice of Happy and Sad narrows that range for evaluation.

The authors expect deeper neural approaches to be helpful because the language contains patterns and nuances a representation based on weighted word occurrences may handle differently. This is a reason to run the comparison. The empirical question is how well each complete approach predicts the labels assigned to the comments, with its particular input representation and training procedure. It is this narrower question that the study’s tables address. Natural language processing

The method, step by step

Collecting comments

The work begins with an automated collection program. The authors use it to retrieve 7,500 YouTube comments from a variety of videos. A comment is the unit that is annotated and later passed to a classifier. The resulting collection is a pool from which the authors can label examples for different purposes. The portion used for sentiment, the broader emotion annotation, and the portion used in the reported emotion experiment each serve a different role.

Collection and labeling solve different parts of the data problem. Collection yields the text. Labeling turns selected text into examples from which a classifier can learn. In the paper’s setup, a person reads a comment and makes a categorical judgment for the task they are annotating. The category ultimately assigned to that comment is the target for both training and evaluation. During training, the learner sees examples with their targets. During evaluation, the system supplies the prediction and the human-assigned target supplies the comparison.

From Malayalam YouTube comments to evaluated predictions

The steps in order.

From Malayalam YouTube comments to evaluated predictionsStep 1: Collect comments from a variety of videos1. Collect comments from a variety of videosStep 2: Assign sentiment or emotion labels by majority vote2. Assign sentiment or emotion labels by majority voteStep 3: Select Happy and Sad for emotion classification3. Select Happy and Sad for emotion classificationStep 4: Tokenize comments and remove stop words4. Tokenize comments and remove stop wordsStep 5: Prepare weighted word features or sequence inputs5. Prepare weighted word features or sequence inputsStep 6: Train classifiers for their assigned tasks6. Train classifiers for their assigned tasksStep 7: Compare predictions with held-out labels7. Compare predictions with held-out labels

Turning judgments into sentiment labels

For sentiment, the authors use the categories Positive, Negative, and Neutral. They report that three people labeled 3,064 comments. A majority vote supplies the final category for each comment. The procedure gives the training set a single target per example while allowing multiple people to make the underlying judgment. The majority label is the reference that a prediction must match in the evaluation.

The authors built an interface for the sentiment labeling work and show it in the paper. Its role is to make the repeated judgment practical. A person needs to read a comment, choose a sentiment category, and record that choice in a form that can be collected with the other annotators’ choices. An interface can facilitate those actions. The category definitions and the procedure for combining judgments determine the meaning of the resulting labels.

The sentiment counts show what that procedure produced. The authors list 1548 Positive comments, 575 Negative comments, and 941 Neutral comments. Positive is the largest group, followed by Neutral and then Negative. This matters at the point of training because the learner receives different amounts of labeled material for the different categories. It also matters when interpreting prediction quality, since overall correctness gives more influence to categories with more examples in the evaluation set.

Majority voting supplies a way to decide which judgment enters the dataset when readers disagree. The paper describes the vote as its aggregation rule and presents the resulting label counts. The reported counts give the distribution of final judgments. A measure of how frequently the readers initially agreed would address a separate question about the ease or consistency of making those judgments. The vote itself summarizes the choices in a form suitable for a classification experiment. Linguistic annotation

Narrowing the emotion experiment

For emotion, the authors describe labeling 1000 comments across 10 categories. Happy and Sad are joined by categories that include Anger, Fear, Surprise, and Excitement. The scheme also includes Affection/Love, Abusive, Sarcasm, and Humour. In this annotation scheme, the word emotion covers both familiar names for feelings and some ways of expressing them or reacting. The authors cite earlier work on emotion in code-mixed social media text as a precedent.

Here too, the authors report judgments from three people and a final label chosen by majority vote. They use a combination of online and offline collection methods for the judgments. The online methods include WhatsApp polls, Google Forms, and Google Sheets. The offline approach uses paper forms. A screenshot illustrates the polling format, and another illustration shows emotion-labeled comments. The variety of annotation formats concerns how people submit their decisions. The majority rule is what converts those decisions into the target used in a dataset.

The distribution reported for the broader effort explains the change in the experimental question. Happy has 417 comments and Sad has 400. Several other listed categories have much smaller counts. The paper, for example, lists 10 comments for Fear and 10 for Sarcasm. The authors choose Happy and Sad because the available examples for individual categories limit what they can attempt across the broader inventory. Their binary experiment uses 817 comments.

Once this selection has been made, the classification problem begins with a comment that already belongs to one of the two chosen categories. Its training target is either Happy or Sad. The classifier learns to choose between those options. Whether a comment from the original pool expresses anger, is sarcastic, or has an completely different interpretation falls outside that choice. The paper’s emotion result therefore depends as much on the selection of the experimental subset as it does on the method used to classify text within it.

Preparing the text

The authors describe preparing the comments by tokenizing them and removing stop words. Tokenization divides a comment into units that later steps can work with. This gives the feature extractor units to count and the sequence-based systems units to read in order. The ability of either approach to use a form depends in part on how the tokenizer treats that form. The paper presents tokenization as a preprocessing step and leaves the boundary rules unspecified. Tokenization

Stop words are items that a preprocessing scheme treats as sufficiently common or uninformative to remove. Removing a word changes what evidence reaches the classifier. For a weighted word representation, it removes the corresponding occurrence from consideration. For an ordered representation, it also changes which retained words appear next to one another. The paper states that stop words were removed. Its description leaves the membership of the stop-word list open, which matters when a frequent expression can carry information about the polarity of a phrase.

The methodology also mentions options such as stemming, which reduces related word forms to a stem, and lemmatization, which maps forms to a dictionary form. It discusses handling special characters or emoticons as another possible preparation step. These appear as possibilities in the description of preprocessing. Tokenization and stop-word removal are the operations the authors explicitly identify when summarizing what they did. The paper gives too little detail to reconstruct how any particular inflected form, nonword symbol, or emoticon would be represented. Stemming · Lemmatization

Building weighted word features

The conventional classifiers receive a representation called term frequency–inverse document frequency, abbreviated TF-IDF. Its purpose is to give a numerical weight to a term using information about its occurrence in an individual document and its prevalence across documents. Here the document is a YouTube comment. The term-frequency part reflects the term’s presence or frequency in that comment. The inverse-document-frequency part gives greater weight to terms found in fewer documents. Together they produce a vector, a set of values with positions corresponding to terms.

This representation changes the form of the learning problem. A classifier can use the weight for a term as an input even when it has no rule about what the word means. A nearest-neighbor system can compare two comments by their positions in the resulting feature space. A decision tree can use a feature in a split. A classifier that learns a boundary can use several weighted terms jointly. What they share is the input vocabulary and the general meaning of each value. How they turn those values into a prediction depends on the learning procedure. TF-IDF

The paper uses this representation for the conventional sentiment comparisons and for the two-class emotion experiment. The feature idea is the same across tasks, while the labeled training examples and prediction targets differ. In the sentiment experiment, the learned rule assigns one of the sentiment categories. In the emotion experiment, the learned rule distinguishes Happy from Sad. The paper gives the method name and its place in the pipeline. It specifies neither a particular weighting equation nor settings that would establish exactly how the vectorizer was fit.

Training the conventional classifiers

The paper compares procedures that make different use of the weighted features. Naive Bayes estimates how the evidence relates to each category using a simplifying assumption about the features. A support vector machine learns a boundary between categories in a feature space. These give two ways to ask how much the weighted vocabulary can contribute to classification. One relies on how evidence is distributed under the labels, while the other relies on separation between labeled examples.

K-nearest neighbors assigns an example using labels of similar training examples. The sentiment result identifies 15 neighbors as the setting used for the reported leading result. A multilayer perceptron, or MLP, learns a mapping through connected layers using the weighted word vector as its input. The paper groups the MLP with the conventional methods in these experiments. The relevant distinction in this grouping is how the comment is represented and processed. The MLP uses the TF-IDF input given to the other classifiers in its group.

A decision tree makes a prediction by following successive feature-based decisions. A random forest combines predictions across multiple trees. The paper includes both in the conventional comparisons. The paired inclusion is useful because the underlying approach is related, while the way the final prediction is formed differs. For all the conventional classifiers, the study evaluates the finished prediction against the same type of human label for the task in question.

The paper describes a split of 80% for training and 20% for testing. Training is the portion used to learn how the inputs relate to the assigned labels. The test portion is reserved for evaluating the resulting predictions. The methods discussion also talks generally about validation and retraining. The reported results identify held-out test portions and give their sizes. Details about how a validation portion or tuning procedure was used in a particular comparison remain unspecified.

Preparing sequence inputs and word vectors

For the recurrent sentiment experiments, the authors describe two input approaches, text-to-sequence and Word2Vec. Text-to-sequence preparation encodes the comment as an ordered series of token identifiers. The conversion gives a network a way to work through the retained units in the order they appear. A weighted feature vector describes which terms are represented and how strongly. An ordered input also makes their positions relative to one another available to the network.

Word2Vec supplies numerical word representations called embeddings. An embedding maps a word to a vector that can serve as the word’s input representation. Tokens represented this way can enter a recurrent system in their order in a comment. The paper describes the use of pretrained embeddings. That implies that at least some of the information used to represent words comes from an earlier learning step. The paper leaves open the source of the vectors, the vocabulary they cover, and the treatment of terms with no available vector. Word embeddings

The distinction between the two reported settings is therefore about the input procedure paired with each recurrent architecture. A text-to-sequence setting represents the ordered tokens for processing by the network. In the Word2Vec setting, the word vectors contribute a different numerical representation of those tokens. Both settings ask the recurrent system to produce a comment-level category. The paper reports separate metric tables for them, which makes it possible to examine how relative performance changes across the listed approaches.

Training the recurrent systems

A simple recurrent neural network, or RNN, reads the input in order and updates an internal state. At each step, the state carries information from earlier steps into the processing of the current input. This makes the approach suitable for a comparison about ordered text because the processing can depend on more than the token seen at the current step. At the end of the classification procedure, the system has to give a label for the whole comment.

Long short-term memory, abbreviated LSTM, is a form of recurrence with learned controls over how information is retained and updated. A gated recurrent unit, or GRU, also uses learned gates to regulate what the state carries forward. These architectures offer different ways to retain information across a sequence. The paper compares them with the simple RNN on the same set of sentiment categories. The intent is to see whether those differences in how the systems handle a sequence produce differences in the quality of their predictions.

The methodology includes a general reference to a DNN, a deep neural network, alongside the recurrent architectures. The results give identifiable rows for the simple RNN, LSTM, and GRU. Those rows are the basis for comparing the reported neural results. The paper describes implementation in Python and the same 80% training and 20% testing proportions for the neural sentiment experiments. The architectures’ layer sizes and training settings are left open, so the named approaches describe the broad comparison rather than an exact implementation specification.

Evaluating predictions

The authors compare predicted categories with the human labels using accuracy, precision, recall, and F1. Accuracy summarizes the share of test examples assigned their recorded category. Precision asks, for a given category, how frequently a prediction of that category is correct. Recall asks how frequently the system retrieves the examples that actually belong to that category. F1 combines precision and recall, rewarding a system for doing well on both. In a task with several categories, the rule used to aggregate category-level precision, recall, and F1 affects how the reported value should be read.

The paper also presents confusion matrices for the conventional sentiment results. A confusion matrix connects true and predicted categories. It can show, for instance, how many comments assigned Neutral by annotators were predicted as Positive, if that cell is reported. Overall accuracy captures the total rate of agreement, while the matrix retains the direction of disagreements. The paper describes the metrics in words and reports their values in the results. It gives no explicit equations for the features, network updates, or evaluation calculations.

Experiments and results

How the experiments are organized

The sentiment and emotion experiments use different held-out sets. The sentiment data consist of 3,064 labeled comments, with 613 comments, or 20%, used for testing. The authors explicitly describe the conventional sentiment classifiers as evaluated on the same test data and give the same test size for the recurrent sentiment results. The input representation separates the three groups of sentiment results: conventional classifiers with TF-IDF, recurrent systems with text-to-sequence, and recurrent systems with Word2Vec.

The emotion analysis uses the 817 selected Happy and Sad examples, with 164 comments, or 20%, reserved for testing. All the reported emotion results use the conventional classifiers with TF-IDF. The task changes the category definitions and the pool of training and testing examples. Reading the paper’s comparisons therefore starts by finding the correct task and input setting before comparing values. The sentiment experiments offer multiple approaches to the same labeling problem. The emotion experiment offers multiple classifiers for the restricted emotion problem.

The conventional systems provide practical benchmarks for the recurrent approaches on sentiment. The paper compares the neural systems with each other within each input setting as well. Its tables report accuracy on a percentage scale and precision, recall, and F1 as decimals. The aggregation convention for the latter metrics is left unspecified. The values are most informative when read as the reported performance summaries for the corresponding table, with care about the distinct questions answered by accuracy, precision, and recall.

Sentiment accuracy with weighted features and recurrent inputs

With TF-IDF features on the sentiment test, the nearest-neighbor classifier and the MLP each record an accuracy of 54.32. The paper identifies the nearest-neighbor setting as using 15 neighbors. The two classifiers also have the same published precision, 0.4831, recall, 0.4451, and F1, 0.4448. The agreement in the aggregate values establishes a tie at the level of the published scores. A check for matching predictions on individual comments would require the predictions or corresponding cell values.

Among the other TF-IDF classifiers on sentiment, random forest reaches 51.71 accuracy and the support vector machine reaches 50.57. The decision tree records 49.27 and Naive Bayes 43.72. The ranking by F1 differs from that by accuracy. Naive Bayes has an F1 of 0.410, above the decision tree’s 0.4012, while random forest has 0.3177 and the support vector machine has 0.2256. These values show why the accuracy figures need to be read alongside the other reported metrics. An approach can make more correct predictions in total while scoring lower under the reported balance of precision and recall.

For the recurrent approaches with text-to-sequence input, accuracy on the sentiment test runs from 52.23 for the simple RNN through 52.89 for LSTM to 54.21 for GRU. The GRU is the accuracy leader within that setting. The Word2Vec results order the architectures differently. LSTM is highest at 52.40, followed by GRU at 51.40 and the simple RNN at 49.26. These are comparisons within the recurrent tables, each with the same set of architecture names and its designated way of representing the words.

Best reported settings by group on Malayalam YouTube sentiment test accuracy

The two leading TF-IDF classifiers tie and are slightly ahead of the best recurrent settings.

Best reported settings by group on Malayalam YouTube sentiment test accuracyK-nearest neighbors with TF-IDF (this paper): 54.32K-nearest neighbors with TF-IDF (thispaper)54.32MLP classifier with TF-IDF: 54.32MLP classifier with TF-IDF54.32GRU with text-to-sequence: 54.21GRU with text-to-sequence54.21LSTM with Word2Vec: 52.40LSTM with Word2Vec52.40
The numbers
System or settingaccuracy %
K-nearest neighbors with TF-IDF (this paper)54.32
MLP classifier with TF-IDF54.32
GRU with text-to-sequence54.21
LSTM with Word2Vec52.40

The chart brings together the leading results for accuracy in the individual tables. The published maximum belongs jointly to the TF-IDF nearest-neighbor and MLP classifiers. The paper’s broad characterization favors deep learning, but the reported sentiment scores qualify that conclusion. The text-to-sequence GRU comes close to the two leaders, and the best Word2Vec result comes from LSTM. For this accuracy comparison, the representation and specific architecture matter more to the reading of the results than the broad category assigned to the classifier.

One detail is easy to lose in that comparison. The study groups MLP with the conventional classifiers, and it is one of the accuracy leaders. An MLP is a neural classifier, but it uses the weighted word representation in this setup. The comparison therefore concerns TF-IDF-based prediction and the evaluated recurrent approaches, with their respective input representations. It gives evidence about these implemented combinations. Reading the result by the supplied features and architectures preserves the distinction the experiments actually make.

What the sentiment metrics emphasize

In the text-to-sequence setting, the GRU has the highest reported precision, 0.4717, alongside its accuracy lead. Its recall is 0.4275, compared with 0.4471 for LSTM and 0.4470 for the simple RNN. The F1 order follows a different pattern from the accuracy order. LSTM leads at 0.4484, followed by the simple RNN at 0.4478 and GRU at 0.4189. A reader choosing the accuracy column would favor the GRU for this representation. A reader choosing the reported F1 column would favor LSTM.

With Word2Vec, LSTM leads its table across all four reported metrics. Its precision is 0.4705 and its recall is 0.4400. Its F1 of 0.4435 is above GRU’s 0.4273 and the simple RNN’s 0.4047. For this representation, the choice of accuracy or F1 leads to the same preferred architecture among the reported recurrent options. The pattern differs from the text-to-sequence setting, where the accuracy and F1 leaders are different.

Recurrent systems on Malayalam YouTube sentiment test F1

LSTM has the highest reported F1 with either input approach, while GRU has its higher F1 with Word2Vec.

Recurrent systems on Malayalam YouTube sentiment test F1Simple RNN with text-to-sequence: 0.4478Simple RNN with text-to-sequence0.4478LSTM with text-to-sequence (this paper): 0.4484LSTM with text-to-sequence (this paper)0.4484GRU with text-to-sequence: 0.4189GRU with text-to-sequence0.4189Simple RNN with Word2Vec: 0.4047Simple RNN with Word2Vec0.4047LSTM with Word2Vec: 0.4435LSTM with Word2Vec0.4435GRU with Word2Vec: 0.4273GRU with Word2Vec0.4273
The numbers
System or settingF1
Simple RNN with text-to-sequence0.4478
LSTM with text-to-sequence (this paper)0.4484
GRU with text-to-sequence0.4189
Simple RNN with Word2Vec0.4047
LSTM with Word2Vec0.4435
GRU with Word2Vec0.4273

The F1 results make the cross-group comparison more specific. Text-to-sequence LSTM, at 0.4484, and the simple RNN in that setting, at 0.4478, exceed the 0.4448 reported for each of the two accuracy leaders using TF-IDF. The strongest Word2Vec result by F1, 0.4435 from LSTM, sits below those values. The paper thus reports some recurrent advantages for F1, alongside the conventional classifiers’ accuracy lead. How much weight to assign to these differences depends on the evaluation objective and on information the paper leaves open, such as variability across training runs.

The reported TF-IDF metrics also show why the sentiment task’s label distribution matters. The support vector machine records precision of 0.1711 and recall of 0.3312, with an accuracy of 50.57. Random forest has accuracy of 51.71 but recall of 0.3668. Reading those alongside their F1 scores shows that accuracy can tell a more favorable story than the other measures. Since the averaging procedure and the test-set counts by category are unspecified, the tables support observations about the metric rankings. Assigning the differences to a specific category or type of error would require more evidence.

Happy and Sad on the emotion test

The two-class emotion results give the highest accuracy to the MLP at 81.71. Its reported recall is 0.5520 and its F1 is 0.5485. The support vector machine comes next by accuracy at 78.05. Naive Bayes has accuracy of 76.22, random forest 74.39, and K-nearest neighbors 73.78. The decision tree records 68.90. These values are for the test of 164 comments selected under the Happy–Sad setup, with TF-IDF features supplying the input for every classifier.

Selected TF-IDF classifiers on the Malayalam YouTube Happy–Sad test by accuracy

The MLP leads the reported emotion accuracy comparison.

Selected TF-IDF classifiers on the Malayalam YouTube Happy–Sad test by accuracyMLP classifier (this paper): 81.71MLP classifier (this paper)81.71Support vector machine: 78.05Support vector machine78.05Naive Bayes: 76.22Naive Bayes76.22Decision tree: 68.90Decision tree68.90
The numbers
System or settingaccuracy %
MLP classifier (this paper)81.71
Support vector machine78.05
Naive Bayes76.22
Decision tree68.90

The MLP also leads the reported emotion F1 comparison. Naive Bayes records 0.5180 and the support vector machine 0.5178, which orders those classifiers differently from their accuracy ranking. The nearest-neighbor classifier records an F1 of 0.4958. Random forest has 0.4895 and the decision tree 0.4603. Here, as in sentiment, ranking systems by accuracy and F1 can change their relative positions even though each metric summarizes performance on the same task.

The detailed precision values in the emotion table warrant care. The MLP’s published precision is 0.5516, but the support vector machine’s precision entry is malformed. The accuracy, recall, and F1 entries for that classifier are separately legible. These include recall of 0.5229 and F1 of 0.5178. The malformed entry leaves the precision comparison involving the support vector machine unresolved. Correcting its value would require information beyond the table and the paper’s discussion.

The separation between accuracy and F1 is substantial for the listed emotion scores. The MLP, for example, has the leading value in both columns, while the values themselves are on different scales and summarize prediction quality differently. The paper lists Happy and Sad counts for the selected data, but leaves the makeup of the emotion test split and the metric aggregation procedure unspecified. The reported numbers support the ranking in the published comparison. They give a limited basis for determining how often the classifiers missed one label in particular, or how the summary metrics were produced from individual decisions.

Reading the two tasks together

The higher emotion accuracy applies to a narrower category choice and a different test set. The task starts by selecting comments already assigned to Happy or Sad from a broader labeling effort. Sentiment has three different target categories and a test drawn from its own labeled data. The counts, class meanings, and comparisons all change. The numerical results establish that the published accuracies in the binary experiment are higher than those in the sentiment tables. The design supplies no common test on which to attribute that gap to the number of labels, the nature of the labels, or the comments selected.

The two comparisons do share a practical observation. An MLP using weighted word features is competitive on both and has the leading emotion accuracy. On sentiment, recurrent approaches provide alternatives whose ranking depends on the representation and the metric. The study’s evidence is most concrete at that level: a specified task, a representation, a named classifier, and a held-out score. Those elements make the results intelligible without attributing the performance to general knowledge of Malayalam or to any particular linguistic phenomenon.

What the ablations show

The paper offers classifier comparisons, a comparison of recurrent input representations, and visual analyses of sentiment errors through confusion matrices, without a formal ablation that removes an individual component from an otherwise fixed system.

Comparing the same named architecture across inputs

All the named recurrent architectures have higher sentiment accuracy with text-to-sequence than with Word2Vec in the reported tables. The best architecture by accuracy changes across the two representations. GRU leads with text-to-sequence, and LSTM leads with Word2Vec. This comparison shows that the ranking of the architecture depends on the setting in which it is evaluated. It also identifies an input procedure that gives higher reported accuracy across the recurrent rows of this particular experiment.

F1 provides a more specific view of the same comparison. The simple RNN and LSTM have their higher reported F1 with text-to-sequence. The GRU has its higher reported F1 with Word2Vec, even though its higher accuracy comes with text-to-sequence. For GRU, the Word2Vec setting has precision of 0.4501 and recall of 0.4264. The text-to-sequence setting has precision of 0.4717 and recall of 0.4275, alongside its lower reported F1. With the averaging rule unspecified, the table gives limited grounds for explaining how those precision and recall summaries relate to the reversal in F1.

The comparison identifies differences between complete settings and leaves the mechanism open. To isolate the effect of the word vectors, an ablation would need to establish the rest of the training and evaluation setup, then change that component alone. Here, the broad representation and the architecture names are available, but details of the embedding training, vocabulary, sequence preparation, and network optimization remain open. The defensible conclusion is that the tested settings yielded different rankings. Specific explanations, such as differences in vocabulary coverage, remain possibilities untested by the comparison.

Comparing learning procedures on the same kind of features

The conventional classifiers offer a different comparison because the paper describes TF-IDF as their shared feature extraction approach. For sentiment, the authors also state that those classifiers use the same test data. Performance varies across the decision procedures even within that common setup. The nearest-neighbor and MLP classifiers tie on the published sentiment metrics, while the remaining classifiers have different combinations of accuracy and F1. The results indicate that the choice of how to use the features matters, even where the feature method stays the same.

In the Happy–Sad experiment, the MLP leads both accuracy and the reported F1. The ordering of the other systems differs across columns, as it does for sentiment. These comparisons help distinguish performance attributed to a particular learning procedure from an assertion that TF-IDF yields a single level of performance. The study describes one shared feature family and several ways to turn its values into a label. The comparisons primarily establish how those completed classifier settings rank on their respective tests.

The paper gives 15 neighbors for the leading nearest-neighbor sentiment setting. That detail identifies the result more precisely, while the effect of the neighborhood size remains unmeasured in the published comparison. A separate series over neighborhood sizes would help identify whether the reported score depended on a narrow setting or was characteristic of the classifier across settings. The paper’s evidence here concerns the named configuration and its tie with the MLP. The same distinction applies to other classifiers whose detailed settings receive less attention.

What the sentiment error figures can address

The authors present confusion matrices for the conventional sentiment classifiers. Those matrices are appropriate for asking which category substitutions account for the errors. Two classifiers can have the same accuracy even if one more often predicts Positive for Neutral comments and the other makes more errors in the opposite direction. Aggregate scores identify the proportion correct or summarize precision and recall. A confusion matrix preserves the distinction between the error directions.

The discussion emphasizes the accuracy leaders instead of quantifying particular category confusions in prose. The figures give a way of examining the category-level behavior for the conventional sentiment systems. A claim about why a particular comment was misclassified would need a different analysis, such as examination of the actual words, their context, and the classifier’s treatment of them. The figures link errors to category pairs. The paper leaves the linguistic sources of those errors open.

Taken together, the available analyses compare complete implementations and show which rankings depend on the metric or input setting. Their strongest conclusions concern the conditions the authors actually vary. The paper’s motivation includes linguistic nuance, but the comparisons give no direct test of whether recurrence helped on comments with specific grammatical patterns or whether weighted features were particularly effective for another kind of text. The results identify system behavior worth explaining, while the evidence for an individual explanation remains limited.

Limitations

Limits the authors identify

The authors treat the scarcity of annotated Malayalam data as the main constraint. To work around it, they collect a pool of comments and undertake manual labeling. They describe the work as ongoing and time-consuming. This puts the reported experiments at a particular stage of annotation. The evaluated data are the portions available for the study, which the authors intend to expand. A larger collection of raw comments would still leave the labeling step to complete before those texts could play the same role in supervised evaluation.

The constraint has a visible consequence for emotion. The authors describe annotation across 10 categories but report a classification experiment for Happy and Sad only. Categories with relatively few labeled examples motivate that decision. Consequently, the 81.71% accuracy measures the leading system on a binary task using selected comments. Its scope covers those labels and that evaluation setup. The paper’s stated plan to expand the data is relevant because broader emotion coverage would require enough labeled material to support a broader training and test design.

The paper mentions Malayalam grammar and the cultural setting of expression as challenges. Its data creation addresses the availability of examples that people have judged. The evaluation asks whether classifiers match those judgments in aggregate. This gives evidence about a task built from language used on the platform. Establishing performance specifically on expressions that depend on cultural context would need examples identified for that property and results reported for them. The authors describe the challenge at a general level and leave that more specific analysis for other work.

Limits apparent from the evaluation design

The authors collect comments from a variety of videos. The paper leaves unspecified how videos were chosen, how the comments are distributed over them, and whether comments from the same video were kept together when forming the splits. A test composed of held-out comments asks about predicting other examples from the selected data. A test that reserves entire videos would ask about transfer to new video contexts. Since the split is described in terms of proportions and comment counts, the article supports conclusions about the reported comment-level tests. Generalization to other videos, channels, or platforms is open.

Annotation by majority vote gives both datasets a usable reference label. The reported procedure leaves several questions about disagreement unresolved. The paper supplies no agreement statistic, detailed annotation guide, or account of how ambiguous combinations of sentiment and emotion were handled. Particularly consequential choices include what counts as Neutral, how to label a comment carrying mixed feelings, and what to do when the target of an emotion must be inferred from context. From the published evaluation, correctness means agreement with the final dataset category. Confidence that a category is easy for different readers to apply would require additional annotation evidence.

The sentiment data also have unequal label counts. Positive is the most frequent label in the full annotated sample, and negative comments are less common. A baseline that always predicted the most frequent training label would provide a reference for interpreting sentiment accuracy. The paper gives the full-sample totals and the number of test comments, while leaving the test-set proportions and the performance of such a baseline unspecified. The headline accuracy therefore supports comparisons among reported settings, with limited evidence about how much the systems improve on a simple frequency-based choice on the same test set.

For emotion, the selected labels have closer counts in the full experimental subset. The paper reports 417 Happy examples and 400 Sad examples. Those totals describe the available labeled data before the test partition is considered. They leave the class balance of the held-out set unknown. This matters when trying to interpret the large separation between accuracy and F1 in the emotion table, especially given the unspecified aggregation method. The scores are usable as reported rankings. Reconstructing category-specific behavior would require more detail about the test samples and the predictions.

The experiment uses held-out evaluation, but the discussion gives little information about variation across repetitions. The published tables give a score for each setting. They supply no uncertainty intervals or repeated-split results that would establish the stability of close scores. That is especially relevant to the accuracies of the leading TF-IDF systems and the text-to-sequence GRU on sentiment. The observed ordering can be reported precisely. Confidence that it would recur after another training run or a different division of the comments remains unquantified.

Limits on attributing the results to individual choices

The deep and conventional sentiment groups change both the prediction procedure and the representation. The conventional systems use TF-IDF. The recurrent systems use sequential inputs, with separate results for text-to-sequence and Word2Vec. An advantage for a complete setting can therefore come from the input representation, the architecture, their interaction, or training details. The paper’s comparisons show which settings performed better by the chosen metric. The hypothesis concerning sensitivity to Malayalam linguistic patterns would need a comparison designed to track those patterns through predictions.

Details of the feature and training pipeline also affect reproducibility. The paper names tokenization, stop-word removal, and the representation methods, while leaving several choices unspecified. These include the tokenizer rules, the stop-word vocabulary, the procedure for fitting feature weights, the origin and handling of the pretrained vectors, and the main recurrent training settings. The study provides the sequence of operations and the reported outcomes. A recreation would require decisions about those details, with room for different reasonable implementations.

The conventional classifiers are the comparison point for the published emotion study. There are no reported recurrent emotion scores to place alongside them. The sentiment results therefore supply no direct answer about whether a recurrent approach would improve the Happy–Sad test. Similarly, the two tasks’ headline values cannot on their own explain why the emotion task has higher reported accuracy. Matching the experiments on data, labels, or assumptions would change the question, and the paper reports each on its own terms.

Finally, the study evaluates text classifications on collected comments. It discusses applications such as recommendations, understanding engagement, and audience analysis, but the experiments measure agreement with annotated comment labels. They leave the effect on a recommendation procedure or an engagement decision unmeasured. Those applications explain why the classification questions matter. The findings themselves establish performance on the defined sentiment and emotion tests, within the scope of the collected data and the reported comparisons.

What came after

The later research record for this study is unspecified. The paper itself sets out two directions for follow-up. The authors plan to expand the annotated dataset and to try additional transformer-based classifiers. Expanding the annotations would address the constraint that led them to restrict the emotion experiment to Happy and Sad. Trying further classifiers would extend the sentiment comparison beyond the weighted-feature and recurrent approaches evaluated in the paper. Both are plans stated by the authors, with outcomes left open.

Cite

Cite as Abeera V P, Sachin Kumar and Soman K P. 2023. Social Media Data Analysis for Malayalam YouTube Comments: Sentiment Analysis and Emotion Detection using ML and DL Models. Proceedings of the Third Workshop on Speech and Language Technologies for Dravidian Languages.

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

@inproceedings{p2023social,
  title = {{Social Media Data Analysis for Malayalam YouTube Comments: Sentiment Analysis and Emotion Detection using ML and DL Models}},
  author = {Abeera V P, Sachin Kumar and Soman K P},
  booktitle = {Proceedings of the Third Workshop on Speech and Language Technologies for Dravidian Languages},
  year = {2023},
  url = {https://aclanthology.org/2023.dravidianlangtech-1.6/}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/p-2023-social-media-data-analysis-malayalam/