Update README.md
Browse files
README.md
CHANGED
|
@@ -33,3 +33,64 @@ configs:
|
|
| 33 |
- split: test
|
| 34 |
path: data/test-*
|
| 35 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
- split: test
|
| 34 |
path: data/test-*
|
| 35 |
---
|
| 36 |
+
|
| 37 |
+
# Binary Classification Dataset: Profession Detection in Tweets
|
| 38 |
+
|
| 39 |
+
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**.
|
| 40 |
+
|
| 41 |
+
## 🧠 Objective
|
| 42 |
+
|
| 43 |
+
Each example contains:
|
| 44 |
+
- A `tweet_id` (document identifier)
|
| 45 |
+
- A `text` field (full tweet content)
|
| 46 |
+
- A `label`, which has been normalized into two classes:
|
| 47 |
+
- `CON_PROFESION`: The tweet contains a reference to a profession.
|
| 48 |
+
- `SIN_PROFESION`: The tweet does not contain any profession-related term.
|
| 49 |
+
|
| 50 |
+
## 📦 Dataset Structure
|
| 51 |
+
|
| 52 |
+
The dataset is formatted as a `DatasetDict` with three splits:
|
| 53 |
+
|
| 54 |
+
| Split | Description |
|
| 55 |
+
|--------------|-------------------------------------------------------|
|
| 56 |
+
| `train` | Balanced dataset containing both classes |
|
| 57 |
+
| `validation` | Contains equal distribution of profession/no-profession |
|
| 58 |
+
| `test` | Also balanced for evaluating binary classification |
|
| 59 |
+
|
| 60 |
+
Each example follows the structure:
|
| 61 |
+
|
| 62 |
+
```python
|
| 63 |
+
{
|
| 64 |
+
"tweet_id": "1242399976644325376",
|
| 65 |
+
"text": "Nuestros colaboradores y conductores se quedan en casa!",
|
| 66 |
+
"label": "CON_PROFESION" # or "SIN_PROFESION"
|
| 67 |
+
}
|
| 68 |
+
```
|
| 69 |
+
|
| 70 |
+
The `label` column is implemented with Hugging Face `ClassLabel`, which makes it easy to convert between string and integer representation.
|
| 71 |
+
|
| 72 |
+
## 🔄 Label Mapping
|
| 73 |
+
|
| 74 |
+
The dataset uses the following class labels:
|
| 75 |
+
|
| 76 |
+
```python
|
| 77 |
+
label_list = ["SIN_PROFESION", "CON_PROFESION"]
|
| 78 |
+
label2id = { "SIN_PROFESION": 0, "CON_PROFESION": 1 }
|
| 79 |
+
id2label = { 0: "SIN_PROFESION", 1: "CON_PROFESION" }
|
| 80 |
+
```
|
| 81 |
+
|
| 82 |
+
These are automatically applied via Hugging Face `datasets.Features`.
|
| 83 |
+
|
| 84 |
+
## 📥 How to Load
|
| 85 |
+
|
| 86 |
+
```python
|
| 87 |
+
from datasets import load_dataset
|
| 88 |
+
|
| 89 |
+
ds = load_dataset("luisgasco/profner_classification_master")
|
| 90 |
+
print(ds["train"][0])
|
| 91 |
+
```
|
| 92 |
+
|
| 93 |
+
## ✍️ Author
|
| 94 |
+
|
| 95 |
+
Processed and [Luis Gasco](https://huggingface.co/luisgasco) for educational purposes, based on the PROFNER corpus.
|
| 96 |
+
|