Views
No views yet
bert-base-uncased) for classifying sentences as being about Black entities. It is common in social sciences to analyse semantic and topic variation by race. Some racial labels do not require complementary language to disseminate meaning, e.g. "Negro". However, mentions of the word "Black" referencing Black people may be confused with many other meanings. This model identifies if a sentence contains a "Black" entity (i.e. person, group or organisation).bert-base-uncasedsentence (string)black_story (0 or 1)1from transformers import pipeline
2classifier = pipeline("text-classification", model="mikemcrae/black-entity-classifier")
3result = classifier("Black activists led a peaceful protest downtown.")
4print(result)1sentence,black_story
2"The Black leaders organized a march for civil rights.",1
3"The mayor discussed the city's budget for next year.",0
4"Black students protested against segregation policies.",1
5"Black car for sale.",0
6
7## ⚙️ Reproduction Instructions
8```python
9from datasets import load_dataset
10from transformers import BertForSequenceClassification, Trainer, TrainingArguments
11
12dataset = load_dataset("mikemcrae/black-article-training-data")
13model = BertForSequenceClassification.from_pretrained("bert-base-uncased", num_labels=2)MIT License © 2025 Mike McRae
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.@inproceedings{mcrae2025blackbert,
title={BERT Classifier for Black Article Detection},
author={Mike McRae},
year={2025},
url={https://huggingface.co/mikemcrae/black-article-classifier}
}