Update README.md
Browse files
README.md
CHANGED
|
@@ -159,14 +159,17 @@ configs:
|
|
| 159 |
path: web/test-*
|
| 160 |
---
|
| 161 |
|
| 162 |
-
|
| 163 |
# PtBrVId
|
| 164 |
|
| 165 |
-
|
|
|
|
|
|
|
| 166 |
|
| 167 |
-
|
| 168 |
|
| 169 |
-
|
|
|
|
|
|
|
| 170 |
|
| 171 |
<p align="center">
|
| 172 |
<table>
|
|
@@ -228,7 +231,7 @@ The corpus consists of the following datasets:
|
|
| 228 |
</tr>
|
| 229 |
<tr>
|
| 230 |
<td>PT-BR</td>
|
| 231 |
-
<td>Brazilian Senate Speeches</td>
|
| 232 |
<td>-</td>
|
| 233 |
<td>~5k</td>
|
| 234 |
<td>CC</td>
|
|
@@ -272,7 +275,7 @@ The corpus consists of the following datasets:
|
|
| 272 |
<td><a href="https://www.aclweb.org/anthology/2021.wlp-1.72/">Cunha (2021)</a></td>
|
| 273 |
<td>Fake News Detection</td>
|
| 274 |
<td>2k</td>
|
| 275 |
-
<td>GPL-3.0
|
| 276 |
<td>✔</td>
|
| 277 |
</tr>
|
| 278 |
<tr>
|
|
@@ -287,90 +290,42 @@ The corpus consists of the following datasets:
|
|
| 287 |
</table>
|
| 288 |
</p>
|
| 289 |
|
| 290 |
-
<p align="center">
|
| 291 |
-
<em>Table 1: Data Sources</em>
|
| 292 |
-
</p>
|
| 293 |
|
| 294 |
-
|
| 295 |
|
| 296 |
-
|
| 297 |
|
| 298 |
-
|
| 299 |
|
| 300 |
-
|
| 301 |
|
| 302 |
-
|
|
|
|
| 303 |
|
| 304 |
-
|
| 305 |
-
|
| 306 |
-
3. Remove all duplicated documents.
|
| 307 |
-
4. Apply the [clean_text](https://github.com/jfilter/clean-text) library to remove non-relevant information for language identification from the documents.
|
| 308 |
-
5. Remove all documents with a length significantly more than two standard deviations from the mean length of the documents in the corpus.
|
| 309 |
|
| 310 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 311 |
|
| 312 |
-
|
| 313 |
-
<img src="assets/pipeline_lid.jpg" alt="Image Description">
|
| 314 |
-
</p>
|
| 315 |
-
<p align="center">
|
| 316 |
-
<em>Figure 1: Data Pre-Processing Pipeline</em>
|
| 317 |
-
</p>
|
| 318 |
-
|
| 319 |
-
#### Class Distribution
|
| 320 |
-
|
| 321 |
-
The class distribution of the corpus is presented in Table 2. The corpus is highly imbalanced, with the majority of the documents being from the journalistic domain. In the future, we plan to release a second version of the corpus with a more balanced distribution across the six domains. Depending on the imbalance of the textual domain, we used different strategies to perform train-validation-test splits. For the heavily imbalanced domains, we ensured a minimum of 100 documents for validation and 400 for testing. In the other domains, we applied a stratified split.
|
| 322 |
-
|
| 323 |
-
<p align="center">
|
| 324 |
-
<table>
|
| 325 |
-
<tr>
|
| 326 |
-
<th>Domain</th>
|
| 327 |
-
<th># PT-PT</th>
|
| 328 |
-
<th># PT-BR</th>
|
| 329 |
-
<th>Stratified</th>
|
| 330 |
-
</tr>
|
| 331 |
-
<tr>
|
| 332 |
-
<td>Politics</td>
|
| 333 |
-
<td>6500</td>
|
| 334 |
-
<td>4894</td>
|
| 335 |
-
<td>✓</td>
|
| 336 |
-
</tr>
|
| 337 |
-
<tr>
|
| 338 |
-
<td>Web</td>
|
| 339 |
-
<td>7960</td>
|
| 340 |
-
<td>21592</td>
|
| 341 |
-
<td>✓</td>
|
| 342 |
-
</tr>
|
| 343 |
-
<tr>
|
| 344 |
-
<td>Literature</td>
|
| 345 |
-
<td>18282</td>
|
| 346 |
-
<td>2772</td>
|
| 347 |
-
<td>✓</td>
|
| 348 |
-
</tr>
|
| 349 |
-
<tr>
|
| 350 |
-
<td>Law</td>
|
| 351 |
-
<td>392839</td>
|
| 352 |
-
<td>5766</td>
|
| 353 |
-
<td>✕</td>
|
| 354 |
-
</tr>
|
| 355 |
-
<tr>
|
| 356 |
-
<td>Journalistic</td>
|
| 357 |
-
<td>1494494</td>
|
| 358 |
-
<td>354180</td>
|
| 359 |
-
<td>✓</td>
|
| 360 |
-
</tr>
|
| 361 |
-
<tr>
|
| 362 |
-
<td>Social Media</td>
|
| 363 |
-
<td>2013951</td>
|
| 364 |
-
<td>6222</td>
|
| 365 |
-
<td>✕</td>
|
| 366 |
-
</tr>
|
| 367 |
-
</table>
|
| 368 |
-
</p>
|
| 369 |
|
| 370 |
-
|
| 371 |
-
<em>Table 2: Class Balance across the six textual domains in both varieties of Portuguese.</em>
|
| 372 |
-
</p>
|
| 373 |
|
| 374 |
-
|
| 375 |
|
| 376 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 159 |
path: web/test-*
|
| 160 |
---
|
| 161 |
|
|
|
|
| 162 |
# PtBrVId
|
| 163 |
|
| 164 |
+
**PtBrVId** is a Portuguese Variety Identification corpus, built by combining pre-existing datasets originally created for different NLP tasks and released under permissive licenses.
|
| 165 |
+
|
| 166 |
+
Our goal is to provide a large, diverse, and multi-domain resource for studying and improving automatic identification of **European Portuguese (PT-PT)** and **Brazilian Portuguese (PT-BR)**.
|
| 167 |
|
| 168 |
+
---
|
| 169 |
|
| 170 |
+
## 📚 Data Sources
|
| 171 |
+
|
| 172 |
+
The corpus is composed of datasets from various domains, each selected to ensure (as much as possible) mono-variety content. The current release is silver-labeled and unsupervised, meaning that we cannot fully guarantee that all documents are strictly mono-variety. A future version will include a refined annotation schema with both automatic and manual verification.
|
| 173 |
|
| 174 |
<p align="center">
|
| 175 |
<table>
|
|
|
|
| 231 |
</tr>
|
| 232 |
<tr>
|
| 233 |
<td>PT-BR</td>
|
| 234 |
+
<td>Brazilian Senate Speeches<sup>1</sup></td>
|
| 235 |
<td>-</td>
|
| 236 |
<td>~5k</td>
|
| 237 |
<td>CC</td>
|
|
|
|
| 275 |
<td><a href="https://www.aclweb.org/anthology/2021.wlp-1.72/">Cunha (2021)</a></td>
|
| 276 |
<td>Fake News Detection</td>
|
| 277 |
<td>2k</td>
|
| 278 |
+
<td>GPL-3.0</td>
|
| 279 |
<td>✔</td>
|
| 280 |
</tr>
|
| 281 |
<tr>
|
|
|
|
| 290 |
</table>
|
| 291 |
</p>
|
| 292 |
|
| 293 |
+
<p align="center"><em>Table 1: PtBrVId data sources and metadata.</em></p>
|
|
|
|
|
|
|
| 294 |
|
| 295 |
+
<sup>1</sup> The **Brazilian Senate Speeches** dataset was created by the authors through web crawling of the Brazilian Senate website and is available on [Hugging Face](https://huggingface.co/).
|
| 296 |
|
| 297 |
+
A raw version of the dataset is available [here](https://huggingface.co/datasets/liaad/PtBrVId-Raw).
|
| 298 |
|
| 299 |
+
---
|
| 300 |
|
| 301 |
+
## 🛠 Annotation & Preprocessing
|
| 302 |
|
| 303 |
+
### Annotation
|
| 304 |
+
We selected data sources known to contain primarily mono-variety Portuguese texts. While this approach helps ensure quality, this **first release** is entirely unsupervised. A planned **v2** will introduce a hybrid annotation strategy combining automated labeling and manual review.
|
| 305 |
|
| 306 |
+
### Preprocessing Pipeline
|
| 307 |
+
To standardize and clean the data, we applied the following steps:
|
|
|
|
|
|
|
|
|
|
| 308 |
|
| 309 |
+
1. **Remove NaN values**.
|
| 310 |
+
2. **Remove empty documents**.
|
| 311 |
+
3. **Remove duplicate documents**.
|
| 312 |
+
4. Apply the [`clean-text`](https://github.com/jfilter/clean-text) library to strip non-relevant content for variety identification.
|
| 313 |
+
5. Remove outlier documents with lengths below `Q1 - 1.5 × IQR` or above `Q3 + 1.5 × IQR`, where `Q1` and `Q3` are the first and third quartiles, and `IQR` is the interquartile range.
|
| 314 |
|
| 315 |
+
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 316 |
|
| 317 |
+
## 📖 Citation
|
|
|
|
|
|
|
| 318 |
|
| 319 |
+
If you use this corpus, please cite:
|
| 320 |
|
| 321 |
+
```bibtex
|
| 322 |
+
@article{Sousa_Almeida_Silvano_Cantante_Campos_Jorge_2025,
|
| 323 |
+
title={Enhancing Portuguese Variety Identification with Cross-Domain Approaches},
|
| 324 |
+
journal={Proceedings of the AAAI Conference on Artificial Intelligence},
|
| 325 |
+
volume={39},
|
| 326 |
+
number={24},
|
| 327 |
+
pages={25192--25200},
|
| 328 |
+
year={2025},
|
| 329 |
+
doi={10.1609/aaai.v39i24.34705},
|
| 330 |
+
author={Sousa, Hugo and Almeida, Rúben and Silvano, Purificação and Cantante, Inês and Campos, Ricardo and Jorge, Alípio}
|
| 331 |
+
}
|