SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2002.10361 · 2020

Multilingual Twitter Corpus and Baselines for Evaluating Demographic Bias in Hate Speech Recognition

arXiv · PDF · Open in the Atlas

Code that ran

9 of 13 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 7 have no contract verdict; 2 failures of our instrument; 4 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2002.10361.json · badge: /api/ran/2002.10361.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
xiaoleihuang/Multilingual_Fairness_LREC canonical (classifier label)
classifier basis: classifier_2025
2 ran · 1 no recorded run
shangoma/Hate_Speech community (classifier label)
classifier basis not recorded on the link
7 ran · 3 no recorded run
FunctionStatusWhere it lives
cal_fnr Ran
ran on a synthesized input
shangoma/Hate_Speech/evaluator.py
code served (permissive licence) · get_code("8b6788633ba3f6c4")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# cal_fnr expects fn (false negatives) and tp (true positives)
# Both should be numeric values (int, float, or tensor-like)
# The function computes fn / (fn + tp)

fn = 5
tp = 15

ARGS = {
    "fn": fn,
    "tp": tp
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
cal_fpr Ran
ran on a synthesized input
shangoma/Hate_Speech/evaluator.py
code served (permissive licence) · get_code("94e86e656c19ab3f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# cal_fpr calculates false positive rate: fp / (fp + tn)
# Parameters: fp (false positives), tn (true negatives)
# Both should be numeric values (int, float, or numpy/torch scalars)

fp = 15
tn = 85

ARGS = {
    "fp": fp,
    "tn": tn,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
cal_tpr Ran
ran on a synthesized input
shangoma/Hate_Speech/evaluator.py
code served (permissive licence) · get_code("f754206459859988")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# The function cal_tpr takes tp and fn as parameters
# It performs a simple calculation: tp / (tp + fn)
# Both tp and fn should be numeric values (int, float, or tensor)

# Creating sample values for true positives and false negatives
tp = 45
fn = 5

ARGS = {
    "tp": tp,
    "fn": fn
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
check_script_is_present Ran
ran on a synthesized input
shangoma/Hate_Speech/analysis/pos/CMUTweetTagger.py
code served (permissive licence) · get_code("a3e18956c3661a5e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import subprocess
import shlex

# The function tries to execute a Java command with --help flag
# It will fail due to missing JAR file, but we can still construct valid arguments
# The function accepts run_tagger_cmd as a parameter (optional, has default)

# Create a minimal stand-in command that won't actually execute successfully
# but will pass the type/argument structure validation
run_tagger_cmd = 'java -XX:ParallelGCThreads=2 -Xmx500m -jar /nonexistent/path.jar'

ARGS = {
    'run_tagger_cmd': run_tagger_cmd
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
doc_stats Ran
ran on a synthesized input
shangoma/Hate_Speech/analysis/analysis_utils.py
code served (permissive licence) · get_code("4b4ef45853527119")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import pandas as pd

# Create a small DataFrame with a 'text' column containing documents
df = pd.DataFrame({
    'text': [
        'hello world this is a test',
        'another document with some words',
        'short one',
        'this is yet another test document with more content'
    ]
})

ARGS = {
    'df': df
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
encode_ethnicity Ran
ran on a synthesized input
shangoma/Hate_Speech/analysis/analysis_utils.py
code served (permissive licence) · get_code("dac490bedc2477b1")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

ARGS = {
    'ethnicity': 'white'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
flat_accuracy Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
xiaoleihuang/Multilingual_Fairness_LREC/bert.py
code served (permissive licence) · get_code("f3e68336634b8642")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned float64, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# flat_accuracy expects:
# - preds: array-like with shape (batch_size, num_classes) - will call np.argmax(axis=1)
# - labels: array-like with shape (batch_size,) - will be flattened

# Create small sample data
batch_size = 2
num_classes = 4

# preds: shape (2, 4) - logits/probabilities for 2 samples, 4 classes
preds = np.array([
    [0.1, 0.9, 0.05, 0.05],  # sample 0, argmax=1
    [0.2, 0.3, 0.4, 0.1]      # sample 1, argmax=2
])

# labels: shape (2,) - ground truth class indices
labels = np.array([1, 2])

ARGS = {
    "preds": preds,
    "labels": labels
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
flat_f1 Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
xiaoleihuang/Multilingual_Fairness_LREC/bert.py
code served (permissive licence) · get_code("7d960114e0d8dfc6")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
from sklearn.metrics import f1_score

# The function flat_f1 takes two parameters:
# - preds: predictions (array-like of class labels)
# - labels: ground truth labels (array-like of class labels)
# Both are passed to f1_score which expects 1D arrays of integer class labels

# Create small sample data
np.random.seed(0)

# Generate 10 samples with 3 possible classes (0, 1, 2)
preds = np.array([0, 1, 2, 0, 1, 2, 0, 1, 2, 0])
labels = np.array([0, 1, 1, 0, 1, 2, 0, 2, 2, 0])

ARGS = {
    'preds': preds,
    'labels': labels
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
label_stats Ran
ran on a synthesized input
shangoma/Hate_Speech/analysis/analysis_utils.py
code served (permissive licence) · get_code("7b0b4ad2ef9d2413")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned DataFrame. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import pandas as pd
import numpy as np

# Create a sample DataFrame with a 'label' column
# The function expects df['label'] to exist and have value_counts() method
df = pd.DataFrame({
    'label': ['cat', 'dog', 'cat', 'bird', 'dog', 'dog', 'cat'],
    'feature1': [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0],
    'feature2': [10, 20, 30, 40, 50, 60, 70]
})

ARGS = {
    'df': df
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
anonymize_data Not yet run
unverified (harvested, no recorded run)
shangoma/Hate_Speech/preprocess.py
code served (permissive licence) · get_code("5b9be1b9286ff017")
How it ran

no invocation recorded.

encode_data Not yet run
unverified (harvested, no recorded run)
shangoma/Hate_Speech/preprocess.py
code served (permissive licence) · get_code("88d73c01b2eb5aa6")
How it ran

no invocation recorded.

runtagger_parse Not yet run
unverified (harvested, no recorded run)
shangoma/Hate_Speech/analysis/pos/CMUTweetTagger.py
code served (permissive licence) · get_code("15122a33985aa114")
How it ran

no invocation recorded.

word_level Not yet run
unverified (harvested, no recorded run)
xiaoleihuang/Multilingual_Fairness_LREC/analysis/predictability.py
code served (permissive licence) · get_code("d4a5d3d393194695")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 1 later) and 12 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
flat_accuracy 4 other papers
1 dated earlier, 3 later
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
2109.05897 (2021-09)
Question Answering over Electronic Devices: A New Benchmark Dataset and a Multi-Task Learning based QA Framework
2405.06459 (2024-05)
Are EEG-to-Text Models Working?
and 1 more not named here

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Existing research on fairness evaluation of document classification models mainly uses synthetic monolingual data without ground truth for author demographic attributes. In this work, we assemble and publish a multilingual Twitter corpus for the task of hate speech detection with inferred four author demographic factors: age, country, gender and race/ethnicity. The corpus covers five languages: English, Italian, Polish, Portuguese and Spanish. We evaluate the inferred demographic labels with a crowdsourcing platform, Figure Eight. To examine factors that can cause biases, we take an empirical analysis of demographic predictability on the English corpus. We measure the performance of four popular document classifiers and evaluate the fairness and bias of the baseline classifiers on the author-level demographic attributes.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2002.10361")
get_code_for_paper("2002.10361")
have("2002.10361")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2002.10361.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2002.10361.svg)](https://syntology.ai/paper/2002.10361)

Connect an agent — have() is free.