---
title: "Detection and Analysis of Offensive Online Content in Hausa"
description: "A study of offensive Hausa posts tests how well classifiers detect abuse and shows why banter, idioms and quotation complicate the task."
canonical: "https://research.elamur.ai/free/en/papers/adam-2023-detection-analysis-offensive-online-content/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/adam-2023-detection-analysis-offensive-online-content/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2023](https://md.research.elamur.ai/free/en/papers/2023/) / Detection and Analysis of Offensive Online Content in Hausa Language

# Detection and Analysis of Offensive Online Content in Hausa Language

Paper · 2023 · Fatima Muhammad Adam, Abubakar Yakubu Zandam and Isa Inuwa-Dutse

**Authors:** Fatima Muhammad Adam, Abubakar Yakubu Zandam and Isa Inuwa-Dutse · **Year:** 2023 · **Venue:** arXiv (Cornell University) · **Licence:** [CC BY 4.0 (arXiv)](https://creativecommons.org/licenses/by/4.0/)

arXiv (Cornell University) · [licence](https://creativecommons.org/licenses/by/4.0/)

- [arXiv 2311.10541](https://arxiv.org/abs/2311.10541)

## Summary

A Hausa expression can be an insult in one conversation and a joke between friends in another. A system that flags every occurrence can mistake banter for abuse, while a system that expects insults to be explicit can miss an attack conveyed through an idiom. The authors investigate both problems in posts from Facebook and X. Hausa has over 100 million speakers, most of them in West Africa, yet it has relatively few annotated resources for [natural language processing](https://md.research.elamur.ai/free/en/concepts/natural-language-processing/). The authors introduce Hausa Offensive Content, or HOC, as the first annotated collection devoted to offensive content in the language.

The study pairs a survey with a [text classification](https://md.research.elamur.ai/free/en/concepts/text-classification/) experiment. The authors report 180 survey participants overall and identify a second part with 101 respondents. Participants rated selected posts, including examples whose offensiveness depended on how an expression was used. About 75% judged one example very offensive, while about 38% judged another example non-offensive despite the presence of a familiar insult. The researchers collected social media posts, assigned labels for language, sentiment, topic and offensiveness, and used survey responses on selected examples to check their judgments. The collection includes Engausa, a mixture of Hausa and English.

The authors compared classifiers trained for the task with pretrained multilingual classifiers. Recognizing sequences of adjacent words generally helped the conventional systems, and the cased multilingual version of BERT was the strongest system overall. The paper reports that its detection system identified over 70% of offensive content, though it gives no split or metric name for that headline figure. A separate check found that Google Translate often mishandled selected Hausa insults, sometimes losing their insulting force and sometimes producing an unrelated reading. The best classifier still made errors in both directions. It flagged a post that reported abuse, treated an ordinary word meaning potash as abusive, and missed strongly abusive wording in another example.

Politics and religion stood out in the authors’ thematic analysis, with ethnicity also prominent in their discussion of offensive terms. Those patterns describe a collection deliberately gathered from sources likely to contain abuse. Together with the survey and error analysis, they show why a label for a whole post requires more judgment than a list of taboo words can supply. The authors propose expanding the collection with help from people familiar with local language use, diversifying the people who make and validate judgments, and giving greater attention to figurative expressions.

## Deep dive: Detection and Analysis of Offensive Online Content in Hausa Language

A study of offensive Hausa posts tests how well classifiers detect abuse and shows why banter, idioms and quotation complicate the task. · about 34 minutes to read

**In this deep dive**

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

### The problem and its context

#### What counts as offensive in a post?

The paper starts from a practical difficulty in online moderation. Social networks give people a place to exchange news, sustain relationships and organize around public issues. They also give abusive messages an audience. The authors connect their study to the social and psychological harms discussed in earlier work on cyberbullying, particularly among young people. Their empirical question is narrower than whether a particular interaction amounts to bullying. They ask whether an individual Hausa post can be classified as offensive and what makes that decision difficult for people and automated systems.

The unit of analysis matters. A post can contain a word commonly used as an insult while reporting what someone else said. The same word can be used in private familiarity or public hostility, and a short text can leave the relationship between speakers unstated. Some phrases communicate contempt through a familiar figurative reading. The authors therefore have to decide what evidence a word supplies about the whole post, and what additional evidence the rest of the post supplies about the word.

The paper places offensive language alongside hate speech, threats, harassment, profanity and other forms of harmful expression. These categories intersect, but they describe different properties of what someone says. The definition of hate speech discussed by the authors covers a range of harmful expressions aimed at people or groups, including stigmatizing language, harassment and threats. A post can be unpleasant or directly insulting without the HOC labels recording a specific kind of hate speech. The classifier’s output records the study’s binary judgment about offensiveness. It offers no separate judgment about the kind of harm, the target or the conduct of an account across several interactions.

Another distinction concerns sentiment, which the study records as positive, neutral or negative. A negative post may express disapproval of abusive behavior. Playful language can contain an insult while carrying a friendly tone. The authors treat negative sentiment as evidence that can help interpret abusive wording, and the annotation scheme gives sentiment its own field. That separation makes it possible to study the association between tone and offensiveness without defining every negative post as offensive.

#### What earlier detection work offered

The paper reviews work that made different decisions about what evidence to collect. Studies of tweets examined hate directed at immigrants or misogynistic content in Spanish and [English](https://md.research.elamur.ai/free/en/topics/english/). HateXplain used categories for hateful, offensive and neutral material, allowing researchers to distinguish kinds of cases that a binary decision would collapse. Work on memes combined visual and textual information because the relation between an image and its caption can carry the message. These examples situate HOC among several ways of framing a detection task. Each framing helps determine which kinds of errors can be measured.

Earlier studies of cyberbullying also looked beyond the vocabulary of an isolated sentence. The paper describes research that classified posts according to whether they came from a person bullying someone, a victim or a bystander. Those roles give a reason why similar language can occur in posts that serve very different purposes. Research on Instagram supplied another example of using content to identify bullying. The authors use this literature to show the range of evidence earlier detection systems had examined, while their own classification experiments focus on post text.

Some of the earlier work addressed the timing and practical cost of detection. The paper describes a system that schedules stages of analysis so that cases can be handled more efficiently, and an approach based on sequential hypothesis testing, where evidence can be considered as it accumulates. It also cites an Instagram study that sought to reduce false positives while improving timeliness and scalability. False positives are posts flagged as offensive in spite of their reference label. The costs of those mistakes become especially clear when a moderation system is used at scale. HOC evaluates classification quality and examines selected mistakes, leaving operating speed and intervention decisions outside the experiment.

The authors connect this work to [sentiment analysis](https://md.research.elamur.ai/free/en/topics/sentiment-emotion/), where the task is to identify the evaluative tone of a text. Earlier studies had drawn on sentiment to help detect hateful or offensive posts. The connection is relevant for Hausa because a phrase can acquire an insulting or a playful reading depending on what surrounds it. HOC retains sentiment labels so that the researchers can examine that relationship. The paper does not describe the separately assigned sentiment label as an input to each of the classifiers.

The review also raises [bias and fairness](https://md.research.elamur.ai/free/en/topics/bias-fairness-safety/) because differences in speech and writing style can affect what an automated system flags. The authors cite work discussing disproportionate effects on African-American users. That evidence concerns the settings examined in the earlier research. For Hausa, it motivates a question about who supplies examples and judgments, and whether the resulting data capture variation within the language. The HOC study reports the makeup of its survey sample and recognizes the need for broader participation.

#### Why a Hausa collection was needed

The resource gap is about what researchers can use to build and test systems. A widely spoken language can lack a collection in which social media posts have been labeled for a particular purpose. The paper reviews research on offensive-language detection in Tamil, Pashto, Urdu and Persian as evidence of interest in extending this work to [low-resource languages](https://md.research.elamur.ai/free/en/topics/low-resource-languages/). It also describes work that drew on external resources to improve detection. Those efforts establish that the problem extends beyond Hausa. Their task labels and data cannot supply Hausa judgments about the local uses of a phrase.

The paper describes Hausa resources for sentiment, corpora assembled for language research, and related efforts in areas such as [topic modeling](https://md.research.elamur.ai/free/en/concepts/topic-modeling/) and [named entity recognition](https://md.research.elamur.ai/free/en/concepts/named-entity-recognition/). It points to a multilingual tweet collection used to support sentiment lexicons and to NaijaSenti, a social media corpus with sentiment labels in major Nigerian languages. It also acknowledges prior work on threats in Hausa alongside research on sexism and hate speech. The gap the authors identify is a dedicated set of annotated Hausa examples for their offensive-content task. Existing Hausa data helped them find candidate words, giving the new collection a starting point.

The paper’s approach follows from that gap. General-purpose translation offers one way to see whether an existing tool recognizes the meaning of a Hausa expression. A multilingual classifier offers another way to reuse existing linguistic information. Both routes still leave the question of how to define and test offensive use. HOC supplies examples labeled for that purpose and lets the authors examine where phrase-level cues, multilingual pretraining and human contextual judgments differ.

### The method, step by step

#### From speaker judgments to a classification task

The researchers use two sources of evidence with different jobs. The survey records what people think about abusive Hausa online and how they interpret selected posts. The social media collection gives the researchers texts on which to develop and evaluate a classifier. Participants contribute examples that can inform the collection, and they also rate selected items that the researchers have annotated. These exchanges connect the two parts of the work while keeping the survey respondents and the collected posts as distinct groups.

The classification task takes one post as input and assigns it to either the offensive or the non-offensive class. In addition to this output, each annotated post has fields the researchers can use to describe the collection, such as language and topic. An abusive expression is a candidate cue for the offensive label. Contextual judgment matters because the same expression can occur in posts assigned to either class. The researchers draw on a Hausa dictionary, earlier data and participant input to connect the vocabulary being sought with its uses in conversation.

From Hausa speaker input to offensive-post detection The steps in order.

#### Survey recruitment and questions

The authors distributed a QuestionPro survey link on Facebook and X. They report 180 volunteers overall, informed consent and no collection of personally identifiable information. They describe two user studies and give a count of 101 for the second part. The overall count and the count for the second part identify different scopes. The paper uses the narrower count in the caption for its selected-post ratings, while it discusses the broader participation when introducing its public-engagement findings.

The questions address how people use Hausa to share information on social media, how they encounter abusive content and how they think it affects participation. The authors also ask about interpretations of particular expressions. A question about whether abuse is common gathers a respondent’s experience or perception. A rating attached to a specific post records how the respondent interprets the text they were shown. Keeping those responses distinct is important because agreement that abuse is widespread leaves plenty of room for disagreement about a particular example.

The post-rating component gives the researchers a way to examine the boundary between banter and offensive use. A text containing a familiar insult may get mixed ratings because the readers infer different tones or relationships. Another text may attract broader agreement about the severity of its language. The authors compare the ratings with their own labels, especially for cases where an abusive expression can be used playfully. A graded survey judgment about how offensive a post seems and a binary label for training have different resolutions. The paper uses the survey as a check on selected cases without specifying a rule that converts its ratings into the binary labels.

#### How posts entered the collection

The authors collected posts from X using its application programming interface, which lets a program submit searches and retrieve matching content. They collected Facebook material manually. Topic selection was deliberate. The aim was to increase the chance of finding offensive and abusive language, so the researchers looked at discussions around politics, sports, relationships and banter, as well as news, trending subjects and accounts associated with controversial exchanges. Both serious arguments and playful interactions were relevant because they could contain the same expressions.

Several sources informed the choice of search terms and what qualified as abuse. The Hausa dictionary Kamus supplied a definition for *zagi*, the term the authors use for abusive language. Earlier Hausa datasets were searched for relevant vocabulary. The researchers also used examples that survey participants identified and considered contextual usage beyond the dictionary definition. A dictionary can indicate that a term has an abusive sense, while the post determines how plausibly that sense applies to a given occurrence.

Searching for topics and candidate words also shapes the examples that reach the annotators. A query can recover a post that uses an insult, a post that quotes it, or a post that discusses the word itself. Collecting all those uses lets a classifier encounter some variation around a familiar phrase. A phrase absent from the search vocabulary may still appear through the selected topics and accounts. The procedure gives no basis for estimating how frequently abuse occurs among all Hausa posts because the chance of inclusion depends on how the authors searched and selected material.

X and Facebook enter through different collection routes. The X procedure is organized around keyword retrieval through the interface. The Facebook procedure relies on manual collection. This matters when considering the examples together, since a manually selected post and a retrieved search match can arrive for different reasons. The paper treats them as sources for building HOC. It gives no platform-specific sampling design that would make their rates of offensiveness directly comparable.

#### Cleaning and normalizing the text

The posts contained repeated text and elements the authors regarded as noise, including links, markup, punctuation, numbers and special characters. The cleaning procedure uses regular expressions, which match patterns in text, to remove several of those elements. Mentions and hashtags were also removed. Duplicate posts were dropped so that repeated copies would contribute less to the collection. The authors describe non-Hausa posts as part of the noise and retain a language label with particular attention to Hausa and Engausa.

The authors removed stopwords, common words treated as carrying little information for the classification features. Their list included Hausa items such as *a*, *ni*, *to* and *su* in addition to standard stopwords. Posts with fewer than eight distinct words were discarded. That rule counts unique words, so repetition on its own cannot bring a post over the threshold. The paper describes the rule as a way to remove texts it considered uninformative. It also sets a boundary on the task, since a short insult or terse reply could fall outside the retained data.

Normalization makes visibly different forms easier to treat as related. The authors describe converting accented vowels, replacing emojis and checking misspellings against a pre-defined Hausa dictionary. They lower-cased the text and applied [stemming](https://md.research.elamur.ai/free/en/concepts/stemming/), which reduces related word forms to a common stem for processing. The paper gives these operations as part of its preparation procedure. It does not give a separate result for the contribution of any one operation, and it does not specify how every normalization choice was shared across classifier families.

Cleaning shapes what becomes available as evidence. Removing a user mention can leave the rest of the sentence intact while taking away an indication of whom it addresses. Removing a hashtag can take away a clue to the topic. Simplifying spellings can help a classifier recognize related forms. These are consequences of the representation the authors describe. The experiment measures how the resulting systems perform, without separately comparing versions in which those clues are restored.

#### What the annotators recorded

The researchers manually assigned a language, sentiment, topic and offensiveness label to each post. Language distinguishes the forms of text relevant to the collection, especially Hausa and Engausa. Sentiment records a positive, negative or neutral reading. Topic locates the post in an area such as politics, religion, sport, education, health or business. Offensiveness supplies the target for training. This is [linguistic annotation](https://md.research.elamur.ai/free/en/concepts/annotation/) at the post level, with several judgments attached to the same piece of text.

Keeping the fields separate makes the dataset useful for different questions. The language field can identify mixed-language examples. The topic field lets the authors examine what kinds of discussions feature in the collection. Sentiment can help analyze why an abusive expression comes across differently from one use to another. The separate offensive label supplies a decision about the post that can be compared with a classifier’s prediction.

The paper describes abusive words as offensive in its short account of the annotation fields, while its wider discussion emphasizes how context can change the label. The researchers say they considered contextual uses and used survey feedback to check examples in which insulting wording appeared in playful and hostile settings. That gives a reader the purpose of the annotation but leaves some borderline decisions underspecified. An annotator deciding whether a person is reporting another speaker’s words needs a rule about how quoted language affects the post label. Similarly, an annotator judging a joke needs to decide how much weight to give tone when the relationship itself is unclear.

The authors use the survey for practical validation on selected items. They distinguish that process from a formal measure of agreement among independent annotators systematically rating the same posts. Agreement on a survey example can support the interpretation of that example, while a mixed response can show where an individual label conceals disagreement. The survey check gives neither a reliability estimate for the collection as a whole nor an error rate for the manual labels.

The ethics conditions also affected how this check was carried out. The authors explain that the approval they had did not cover exposing annotators to extensive offensive material without additional provisions. They identify mental health support and clear instructions for handling sensitive material as examples of those provisions. They plan to supplement survey-based validation with formal agreement checks under a stronger annotation process.

#### Turning a post into numerical features

The conventional classifiers need numerical input. The authors explore [word embeddings](https://md.research.elamur.ai/free/en/concepts/word-embeddings/) and [TF-IDF](https://md.research.elamur.ai/free/en/concepts/tf-idf/) as ways to represent cleaned text. An embedding gives a word a vector, a group of numerical values locating it in a space where words can be represented in relation to one another. The paper presents this as a way to make semantic relationships available to a classifier. TF-IDF gives a term weight according to its frequency in a document and its distribution across the collection. A term that recurs in a particular post can be informative, while a term common across the collection can have less power to distinguish that post.

A term for TF-IDF can also be a sequence. An [n-gram](https://md.research.elamur.ai/free/en/concepts/n-gram/) is a run of adjacent tokens, where *n* stands for the number of tokens in the run. A token is a unit of text used for processing. The authors try unigrams for individual tokens, bigrams for adjacent pairs and trigrams for adjacent triples. The larger features preserve a little word order. A classifier can then treat a familiar expression as a unit even when each component also occurs in ordinary language.

The authors illustrate that point with *dan iska*. The components are glossed in terms of affiliation or descent and air, respectively, while the expression can mean rascal. Treating each word as a feature gives the classifier access to the components. A bigram gives it access to their combination, which can be associated more directly with the expression. Surrounding phrases may supply context, but a feature for the expression alone says little about whether the writer is joking or aiming an insult at someone. The detection task predicts a class for the post. It uses adjacent words as classification evidence.

The paper reports exploring both embeddings and TF-IDF, but it gives more detail about the comparison across n-gram settings than about the exact feature assignment to every classifier. Its strongest statement about representation concerns the presence of local word sequences. The article’s method description does not support attributing every reported improvement to embeddings or specifying how particular vectors and weighted counts were combined.

#### The classifiers and what they can learn

The conventional comparison spans several families of [machine learning](https://md.research.elamur.ai/free/en/concepts/machine-learning/). Logistic regression uses numeric features to make a class prediction by learning how strongly they support each outcome. A support vector machine learns a boundary between classes, with the margin expressing how far the nearest training cases lie from that boundary. Naive Bayes makes a prediction using probabilities and assumes conditional independence of the features given the class. This assumption means that once the class is fixed, the classifier treats the feature evidence as independent.

The tree-based systems are random forest and XGBoost. A random forest combines decisions from a collection of trees. Each tree divides cases through a series of feature tests. XGBoost also combines trees, using a boosting procedure that builds up a prediction through successive corrections. These approaches can use combinations of inputs, such as a cue whose value changes when a second cue is also present. The paper includes them as alternatives to the linear, margin-based and probabilistic approaches.

The neural classifiers are a multilayer perceptron, abbreviated MLP, and a convolutional neural network, abbreviated CNN. An MLP passes values from the input through one or more intermediate layers to an output that predicts the class. A CNN learns filters that can respond to local patterns. Pooling then summarizes some of those responses before a final prediction is made. This gives the CNN another way to work with local patterns, although the paper’s results provide only a limited basis for determining what patterns drove its decisions.

The multilingual comparison uses XLM-RoBERTa and cased multilingual BERT, called mBERT. These classifiers start from multilingual pretraining, where the system learns numerical representations from text before it is applied to the particular detection task. Both use a [Transformer](https://md.research.elamur.ai/free/en/concepts/transformer/), an architecture that uses attention to combine information across positions in an input. That gives a token’s representation a way to depend on its surroundings, which is pertinent when the same word can carry different force in different posts.

The authors describe XLM-RoBERTa’s pretraining source as 2.5TB of filtered CommonCrawl text spanning 100 languages. They describe mBERT as pretrained on Wikipedia text from 104 languages, using a masked prediction objective. In that objective some input text is hidden, and the system learns to predict the hidden part from context. The authors use the Hugging Face implementations of both systems. These pretraining figures describe the multilingual systems’ earlier exposure to text. The paper gives no corresponding amount of Hausa text seen by each system during pretraining.

The practical comparison asks how much the systems differ when applied to offensive posts in HOC. Conventional classifiers learn from numeric features built from the study data, while the pretrained systems bring representations learned earlier from multilingual text. Their architectures and representations differ together. This comparison can establish which systems the authors found strongest on their task. Isolating the contribution of pretraining would require a comparison that held those other differences constant.

#### Scoring the decisions

The positive class is offensive. A true positive is a post labeled offensive that the classifier also flags. A false positive is a post it flags whose reference label is non-offensive. A false negative is an offensive post it leaves unflagged. A true negative is a non-offensive post it leaves unflagged. A confusion matrix organizes these counts so that a reader can distinguish failures to catch abusive content from erroneous flags on other content.

```
accuracy = (TP + TN) / (TP + TN + FP + FN)
```

Here *accuracy* is the fraction of all evaluated posts assigned the correct label. *TP* and *TN* are the true-positive and true-negative counts. *FP* and *FN* are the false-positive and false-negative counts. The plus signs add the counts, the parentheses group each sum and the slash divides the number of correct decisions by the total. The equals sign sets out the definition.

```
precision = TP / (TP + FP)
```

Here *precision* is the fraction of flagged posts that have the offensive reference label. *TP* counts the correct flags, and *FP* counts flags on posts labeled non-offensive. The plus sign adds those groups, the parentheses delimit the total number of flags and the slash divides the correct flags by that total. The equals sign defines precision in terms of the counts.

```
recall = TP / (TP + FN)
```

Here *recall* is the fraction of posts labeled offensive that were flagged. *TP* counts the offensive posts that were detected. *FN* counts the offensive posts that were missed. The plus sign adds those counts, the parentheses delimit the total with an offensive reference label and the slash divides the number detected by that total. The equals sign defines recall.

The authors also use F1, which gives precision and recall equal weight in a single score. Accuracy summarizes correct decisions on both classes, while precision and recall put the emphasis on different consequences of assigning the offensive label. A system can score well on recall by flagging many posts and still make numerous false accusations of offensiveness. Conversely, a system can score well on precision while missing posts whose attacks are expressed less directly. The translation check uses a different kind of evidence. The authors compare the rendering of selected phrases with their intended meaning, without asking the translation service to produce a binary label for each HOC post.

### Experiments and results

#### What the survey measured

The survey and the detection experiment yield different results. The survey describes respondents’ experiences, perceptions and ratings. The classification experiment concerns decisions compared with HOC’s manual labels. The paper describes a typical survey participant as male, between 25 and 35 years old and educated at the postgraduate level. It mentions students and identifies public-sector employment as the main workplace category, followed by self-employment. The survey percentages characterize the participating respondents, whose recruitment and demographic composition matter to their interpretation.

The authors report that 49% expressed concern about the spread of offensive material, especially abusive content. They report that 33% encountered offensive material quite frequently. These answers capture two different things. One is a judgment about how widespread the problem seems, and the other is a statement about how frequently the respondent remembers encountering it. The study does not match these impressions against a log of the posts seen by each respondent.

The paper reports that about 83% of respondents thought young people used abusive expressions most often. It also says 21% indicated that they would be likely to comment on an abusive post. The authors connect the latter result to the possibility of playful as well as hostile uses. The answer records a stated likelihood of engagement, leaving open whether a respondent would comment to criticize the language, respond in kind or participate in banter. The judgment about age likewise records what respondents believed about usage, without identifying the ages of the people who wrote the collected posts.

About 41% believed that abusive, hateful or offensive content harms online engagement. A reported 86% associated political discussion with much of the abusive and hateful material they encountered or perceived online. Those views helped the researchers investigate topic and tone. In the corpus analysis, a political label describes the subject of a selected post. In the survey, the political result describes a respondent’s judgment about a broader pattern. The two forms of evidence address related questions at different levels.

#### Why the post ratings matter

The second part of the survey, identified as having 101 respondents, included ratings for selected posts. Roughly three in four gave example 1 a rating of “very offensive.” Example 2 contained *dan iska*, a phrase frequently treated as an insult, yet about 38% rated the post as non-offensive. The authors also report mixed judgments for examples 3 and 4, with 28% and 31% of the participants, respectively, labeling them offensive. These figures refer to responses about particular texts, rather than predictive accuracy or the proportion of offensive material in HOC.

The first example shows that a post can invite a relatively common reading of its severity among respondents. The second shows how readers can diverge even when an expression has a well-known abusive sense. The presence of the phrase supplies information about the post, but it gives an incomplete account of what the writer is doing with it. Examples 3 and 4 extend the evidence of disagreement without establishing how common such cases are across the corpus.

The paper’s distinction between degrees of offensiveness and a binary decision is visible here. A judgment of very offensive occupies one part of a rating scale, while a label of offensive on a post answers a broader question. The results are best read item by item, with the response category attached to each number. Comparing the reported percentages as though they all measured unanimous agreement on the same binary label would erase that difference.

#### What was in the classification comparison

HOC contains posts gathered from X and Facebook, including Hausa and Engausa. The paper describes a range of topics and relatively little negative sentiment in the collection. The authors take that sentiment pattern as an indication that abusive vocabulary frequently appeared in contexts they regarded as less offensive. Sentiment distributions describe the tone assigned to the posts. Determining which expressions distinguish playful and hostile uses still requires looking at the language and annotation for the individual cases.

The authors found no standard Hausa benchmark for this detection question. Their main empirical comparison therefore uses the HOC collection they constructed. It includes conventional systems with alternative text features and the two pretrained multilingual systems. Google Translate is considered separately through individual phrase translations. XGBoost, for instance, predicts a class that can be evaluated against HOC labels, while the translation service returns English wording that the authors inspect for meaning. The reported results provide no common classification score for those two kinds of output.

Among the conventional systems, the authors report the highest F-scores for XGBoost and CNN, in that order. They print the values as 0.86% for XGBoost and 0.84% for CNN. Those percent signs are part of the reported notation. The paper gives no clarification of the scale in its account of the results, so the figures are reproduced as written. The accompanying prose ranks SVM, MLP and logistic regression behind that pair. This comparison names the metric and the dataset. The authors’ numerical sentence does not identify an evaluation split or specify a feature setting for each of the two values.

Reported F-scores for the leading conventional systems on HOC XGBoost leads the conventional comparison, followed by the CNN.

**The numbers**

| System or setting | F-score % |
| --- | --- |
| XGBoost (this paper) | 0.86 |
| CNN | 0.84 |

The paper reports that pretrained multilingual classifiers outperform the conventional systems overall. It identifies `bert-base-multilingual-cased` as the best-performing classifier when introducing the detailed error analysis. The authors also report that their detection system identified over 70% of offensive content. They give that headline figure without a named metric, an evaluation denominator or a split, so it should be read as the authors’ description of detection performance. It cannot be directly reconciled with the two printed conventional F-scores from the details accompanying those claims.

Accuracy and F-score give complementary views of performance, and the paper also discusses precision and recall for the detection task. For a system meant to find abusive posts, the distinction is consequential. The most important errors in one setting could be missed attacks, while in another setting a high volume of mistaken flags could overwhelm review. The paper presents the predictive results as an initial demonstration and uses individual errors to show what a stronger aggregate score can leave unresolved.

#### How the translation check was conducted

The authors examined Google Translate’s English renderings of frequent Hausa expressions. Their comparison sets the abusive or idiomatic reading they associate with an expression beside the translation returned by the service. *Dan iska* is interpreted as rascal, but its translation leaves part of the Hausa phrase unresolved. Another phrase which the authors gloss as a vulgar insult was rendered as *father’s cousins*. A phrase glossed as an insult involving a donkey came back as *wow what*. These cases show different ways that an intended meaning can be lost.

The study also considers related forms with gendered glosses. The authors interpret *sakarai* and *sakara* as referring to someone dull, with the former glossed for a male and the latter for a female. The corresponding results were *boy* and *connection*. In the first output a broad reference to a person survives while the negative characterization disappears. In the second the English word offers little indication that it is describing a person. The authors’ point is that even often occurring expressions can be mishandled when the translation fails to carry local usage across.

The selected cases include both renderings that sound literal and renderings that are difficult to relate to the authors’ intended meaning. The examples establish particular failures of translation. They give no overall error rate for Google Translate and no estimate of how often a moderation process based on translation would miss abuse. They do illustrate a practical obstacle to detecting Hausa abuse by translating it first. If the translation loses the insult, a classifier working only with the English output has lost a clue before it makes a decision.

#### How topic and sentiment figured in the findings

Politics was prominent in both respondents’ perceptions and the authors’ examination of abusive terms. The thematic discussion identifies religion, ethnicity and politics as especially prominent for offensive terms. The authors describe political exchanges, including those they associate with young people, as a setting that attracts abusive language. The claim about young people draws partly on the survey and participant comments. The paper gives no age-by-topic analysis of the authors of the social media posts.

The authors compare the themes present in the corpus and consider where offensive or abusive terms appear. The distinction between the share of posts on a topic and the chance that a post on that topic is offensive is important. A theme well represented in the collection can supply many examples simply because many posts were collected on it. The authors sought out politically contentious and other potentially abusive exchanges, so the thematic prominence is a property of the material the study assembled. The topic findings draw attention to settings where the researchers encountered problems of interpretation and detection.

Sentiment gives an additional way to examine the use of abusive vocabulary. The authors consider the terms alongside positive, negative and neutral labels. Negative tone strengthens an offensive reading in some examples, while other uses occur in teasing or friendly exchanges. That analysis supports attending to the surrounding post and the communicative role of the expression. The results give no measured rule for how much the sentiment label would improve a classifier, or how frequently it would lead to the wrong conclusion about a post.

### What the ablations show

#### Changing the size of the text features

The paper reports no formal ablation that removes individual components from the best system. It offers a comparison across n-gram settings, errors from the strongest multilingual classifier, and qualitative analyses of translation, sentiment and figurative usage. The n-gram experiments give the closest view of how a specific change to the representation affects the classification results.

The body of the results section broadly credits trigrams with better performance. The associated table caption specifies an exception for the CNN. The comparison therefore supports a tendency for longer sequences to help the conventional systems, with the CNN singled out as an exception to the general improvement. The prose’s broader claim that trigrams improved all systems should be read with that qualification. The paper does not specify a significance test in its discussion of the improvement.

The distinction has a linguistic interpretation. If a classifier gets only individual word features, components of a familiar insult can also be prominent in posts where those components have everyday uses. A sequence feature can express that the words occurred together and in a particular order. An advantage for longer sequences is consistent with the authors’ observation that many abusive expressions contain several adjacent words. It is also consistent with longer sequences carrying nearby clues to tone. The aggregate comparison does not identify which of those possibilities drove each improvement.

The CNN result leaves open why the additional n-gram features helped differently across classifiers. A convolutional architecture can respond to local patterns, making some overlap with explicitly defined word sequences plausible. The paper provides no analysis that attributes the CNN exception to that mechanism. The comparison does show that the value of changing the text features depended on which classifier used them.

#### What the strongest classifier got wrong

The authors selected cased multilingual BERT for the reported error examples because it was the strongest classifier in their comparison. Using errors from the best overall system shows what can remain difficult even after the gains over the conventional systems. The examples concern both excessive flagging and missed offensive content. They supply possible explanations for specific decisions, though the authors do not report how frequently each error type occurs.

In one case, a post used abusive language to describe inappropriate behavior. The classifier treated the post itself as abusive. This is a difference between mentioning abuse and carrying it out. Both uses can contain the same expression. To make the intended distinction, a system has to interpret what the writer is doing with the expression in the sentence. The authors view the error as evidence of reliance on the presence of the abusive term, an interpretation consistent with the example but not a direct measurement of which parts of the text drove the decision.

Another false positive contains *kanwa*, which the paper glosses as potash. The authors suggest that rare or unfamiliar wording can be treated as a signal of abuse. In this example a term with an ordinary meaning occurred in a post the classifier flagged. The error demonstrates a mismatch with the label. It does not establish whether rarity, the term itself or surrounding words were responsible. An error example reveals the behavior on that input without showing what evidence would have changed the prediction.

The authors also identify a false negative containing strongly abusive language. That example shows that the classifier can miss a direct attack as well as overreact to the appearance of an insult in benign context. The two mistakes require different interpretations. When abusive wording is mentioned in a report, the decision requires attention to its role. When strongly abusive wording is missed, the difficulty may include recognizing its meaning in the first place. The paper uses these cases to motivate broader and more varied training data.

#### Figurative language, tone and translation

The idiom analysis considers language whose force depends on a learned figurative reading. Words can add up to a surface meaning that conceals an accusation, a dismissal or another form of offense. The authors identify examples in their material and discuss how their readings can change with context. They point to a failed Google translation of one of the expressions. This analysis extends the translation check beyond isolated insults by showing why an apparently complete English rendering can still miss the purpose of a Hausa phrase.

The treatment of banter looks at another kind of uncertainty. A system may recognize a phrase and know it has an abusive reading, yet still have to decide whether that reading describes the interaction at hand. The authors compare abusive terms across sentiment categories and use survey ratings to show that readers can reach different judgments about selected posts. Positive, neutral and negative tone provide different backgrounds for the same vocabulary. A tone label can therefore help explain a reading even when that tone label would be insufficient as a substitute for the offensiveness judgment.

These observations concern different points at which a decision can fail. Translation can lose the meaning conventionally associated with an expression. Recognizing the expression in Hausa can still leave its use in a particular post ambiguous. Failing to distinguish reporting from attacking is a further problem, even if the classifier recognizes the abusive meaning. The paper documents examples of each and links them to data collection and evaluation. It provides no controlled comparison that measures their relative contribution to overall error.

### Limitations

#### Limits the authors state

The authors identify the need for more annotated material, especially examples that represent ambiguous expressions and subtle figurative abuse. A collection can include several common insulting phrases while still offering few examples of the ways any one phrase is used. Those uses include direct attacks, reports of attacks and banter. Varied examples would let future studies test whether a classifier recognizes the distinction in cases where the vocabulary itself provides little basis for the decision.

The paper also acknowledges a survey sample skewed toward men. Volunteer recruitment through Facebook and X reached people on social media, with a typical participant profile that covered a limited segment of potential Hausa users. The authors intend to recruit more diverse annotators and seek input from the public, linguistics experts and news organizations. Such engagement is proposed as a way to improve how the data reflect different conventions and judgments, and to better represent local tones and idiomatic uses.

Annotator exposure is another stated constraint. The authors describe approval for the postgraduate research and say it did not cover extensive exposure to offensive content without added safeguards. They propose mental health support, handling guidance and formal checks of agreement as part of future annotation. The study therefore relies on the manual labels and review of a selection of examples through the survey. The authors present formal reliability assessment as work that remains to be done.

They also propose exploring more powerful pretrained systems and curating examples that convey local uses of idioms more clearly. That direction follows from the kinds of failures they observed. They give no result showing the effect of those additions. Their present evidence consists of the reported performance on HOC and the analyses of the cases and expressions they examined.

#### Limits of the measurements

The scope of the reported comparison is difficult to reconstruct in detail. The paper does not give a usable corpus size and class balance together with the headline results, define the division into training and evaluation data, or explain whether similar material from the same accounts or discussions was kept within one partition. Removal of duplicates addresses repeated copies. A phrase, a near-duplicate paraphrase or a discussion prompt can recur without producing an identical post. The absence of these details prevents a reader from determining how much of the performance reflects transfer to genuinely new wording or sources.

The metric notation presents a separate difficulty. The numerical values for the leading conventional classifiers are printed with percent signs, without clarification of the intended scale. The claim of detecting over 70% of offensive content has no explicit link to a particular precision, recall, accuracy or F1 calculation. Those reporting ambiguities leave the qualitative rankings easier to interpret than the magnitude of the differences. There are also no comparable estimates for particular error types, such as misclassifying a report of abuse. The illustrations show that those errors occurred and leave their frequencies open.

The comparisons show how the systems performed under the authors’ HOC experiment. They do not isolate the effect of multilingual pretraining from architecture, representation or training choices. Likewise, the feature comparison bears on word-sequence size but gives no corresponding experiment that removes stemming, restores mentions or changes the short-post rule. This limits what can be concluded about why one classifier performed better. It also leaves open how the same systems would perform if the original posts were presented with all their formatting and surrounding conversational cues.

An evaluation against manual labels also inherits the uncertainty in those labels. The survey demonstrates that people can assign different readings to a post with an abusive expression. The study does not quantify agreement across the full collection or specify how disputed cases were resolved into one label per post. A classifier error on an item like these could reflect poor language interpretation, ambiguity in the text, or a difference between plausible judgments. The absence of a systematic agreement measure makes those explanations hard to distinguish in the aggregate.

#### Limits when applying the findings beyond HOC

A corpus built to find likely abusive material answers questions about the cases it contains. Population-wide claims require a sampling method appropriate to the population being described. HOC combines searches for particular terms and settings with manual selection from Facebook. The authors’ choice to examine controversial topics and accounts helps locate difficult cases. It also means the topic and sentiment distributions cannot establish the prevalence of those properties across Hausa social media. The survey measures impressions among volunteers and supplies no independent prevalence estimate.

The retained posts are shaped by a requirement for at least eight distinct words and by cleaning that removes features such as mentions and hashtags. Very short replies and posts whose meaning depends on one of those features are consequently hard to study with this setup. A thread can identify whom a statement is aimed at or whether the writer is responding to an insult, while the experiment’s unit is a post. Findings from the cleaned texts therefore give limited information about moderation of short, context-dependent exchanges.

HOC’s language field recognizes the presence of Engausa, which is important for describing the collection. The paper does not report separate detection results for Hausa and Engausa or for different varieties of Hausa. A reader cannot infer equal performance across those cases from the overall comparison. The selected Google Translate examples likewise illustrate specific translation failures and cannot be extrapolated to every type of post, platform or topic.

Finally, the authors discuss possible consequences of unchecked abuse, including worsening harassment and the risk of offline conflict around contentious issues. Their experiments measure classifications, interpretations of posts and respondents’ perceptions. They do not track how a particular incident developed or test whether flagging posts changes subsequent behavior. The study therefore contributes evidence about detection and interpretation. The effectiveness of a moderation intervention, including its consequences for people whose posts are mistakenly flagged, remains a separate empirical question.

### What came after

No later citing study is documented for this work. The paper closes with plans to expand the annotated collection, document idiomatic expressions and test stronger pretrained classifiers on Hausa offensive content. The authors envisage bringing a wider range of speakers into annotation and validation, with support for people who would review substantial amounts of sensitive material. These are directions proposed by the authors rather than reported follow-up results.

The paper leaves several concrete questions for subsequent work. Its word-sequence experiments show that representing phrases can improve detection, while its strongest classifier’s mistakes show how much depends on recognizing what a writer is doing with a phrase. Its selected survey examples show where human judgments diverge, without measuring the extent of disagreement throughout the corpus. A follow-up using independently rated examples and varied sources could examine whether the same distinctions hold across speakers and settings. The paper itself establishes the initial Hausa collection and the evidence motivating those questions.

## Cite

Cite as Fatima Muhammad Adam, Abubakar Yakubu Zandam and Isa Inuwa-Dutse. 2023. Detection and Analysis of Offensive Online Content in Hausa Language. arXiv (Cornell University).

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.48550/arxiv.2311.10541](https://doi.org/10.48550/arxiv.2311.10541) · [arXiv 2311.10541](https://arxiv.org/abs/2311.10541)

```bibtex
@misc{adam2023detection,
  title = {{Detection and Analysis of Offensive Online Content in Hausa Language}},
  author = {Fatima Muhammad Adam, Abubakar Yakubu Zandam and Isa Inuwa-Dutse},
  year = {2023},
  doi = {10.48550/arxiv.2311.10541},
  eprint = {2311.10541},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.2311.10541}
}
```

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