metadata
dataset_info:
features:
- name: tweet_id
dtype: string
- name: text
dtype: string
- name: label
dtype:
class_label:
names:
'0': SIN_PROFESION
'1': CON_PROFESION
splits:
- name: train
num_bytes: 711780
num_examples: 2786
- name: validation
num_bytes: 238488
num_examples: 999
- name: test
num_bytes: 242754
num_examples: 1001
download_size: 807660
dataset_size: 1193022
configs:
- config_name: default
data_files:
- split: train
path: data/train-*
- split: validation
path: data/validation-*
- split: test
path: data/test-*
Binary Classification Dataset: Profession Detection in Tweets
This dataset is a derived version of the original PROFNER task, adapted for binary text classification. The goal is to determine whether a tweet mentions a profession or not.
๐ง Objective
Each example contains:
- A
tweet_id(document identifier) - A
textfield (full tweet content) - A
label, which has been normalized into two classes:CON_PROFESION: The tweet contains a reference to a profession.SIN_PROFESION: The tweet does not contain any profession-related term.
๐ฆ Dataset Structure
The dataset is formatted as a DatasetDict with three splits:
| Split | Description |
|---|---|
train |
Balanced dataset containing both classes |
validation |
Contains equal distribution of profession/no-profession |
test |
Also balanced for evaluating binary classification |
Each example follows the structure:
{
"tweet_id": "1242399976644325376",
"text": "Nuestros colaboradores y conductores se quedan en casa!",
"label": "CON_PROFESION" # or "SIN_PROFESION"
}
The label column is implemented with Hugging Face ClassLabel, which makes it easy to convert between string and integer representation.
๐ Label Mapping
The dataset uses the following class labels:
label_list = ["SIN_PROFESION", "CON_PROFESION"]
label2id = { "SIN_PROFESION": 0, "CON_PROFESION": 1 }
id2label = { 0: "SIN_PROFESION", 1: "CON_PROFESION" }
These are automatically applied via Hugging Face datasets.Features.
๐ฅ How to Load
from datasets import load_dataset
ds = load_dataset("luisgasco/profner_classification_master")
print(ds["train"][0])
# Show features
print(ds["train"].features)
# Ver etiquetas as strings para un ejemplo:
example = ds["train"][5]
print(example["label"]) # IDs
print(ds["train"].features["label"].int2str(example["label"]))
โ๏ธ Author
Processed and Luis Gasco for educational purposes, based on the PROFNER corpus.