Datasets:
The dataset viewer is not available for this dataset.
Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
Consultas UNLu: Spanish Student E-mail Classification
Consultas UNLu is a dataset of 1,000 e-mails in Spanish, written by students of the Universidad Nacional de Luján (UNLu, Argentina) to the administrative staff through the University's academic management system. Each e-mail was manually labeled by a domain expert with the topic of the query, out of 16 classes (e.g., Boleto Universitario, Ingreso a la Universidad, Problemas con la Clave).
The dataset was curated for research on multi-class classification of short, informal, highly imbalanced e-mail texts in Spanish, and was used in the paper Multi-class E-mail Classification with a Semi-Supervised Approach Based on Automatic Feature Selection and Information Retrieval (Fernández & Errecalde, 2022) and related work.
- Language: Spanish (Argentina)
- Task: multi-class text classification / topic classification, semi-supervised learning
- Size: 1,000 labeled e-mails (train: 800 / test: 200, stratified by class) + 19,776 unlabeled e-mails (
unlabeledconfig) - Domain: academic-administrative queries from university students
- Source repository: https://github.com/jumafernandez/clasificacion_correos
The dataset has five configurations:
default: the 1,000 manually labeled e-mails, with 22 additional static attributes, in the original train/test split.unlabeled: 19,776 unlabeled e-mails from the same collection — the knowledge base used by the semi-supervised labeling and instance-retrieval experiments of the associated papers.retrieved-lr,retrieved-tfidf,retrieved-ss3: three automatically labeled datasets (3,200 e-mails each, 200 per class) built from the unlabeled collection with the semi-supervised retrieval strategy of the associated papers, using Logistic Regression, TF-IDF and SS3 respectively for per-class feature selection.
Dataset origin and curation
UNLu's academic management system lets students send queries by e-mail to the administrative staff. From a raw collection of 24,700 query e-mails (which, after preprocessing and cleaning, yielded a knowledge base of 20,876 e-mails), 1,000 e-mails were randomly sampled and manually labeled according to the topic of the query. The labeling was carried out with the advice of UNLu's Director General of Academic Affairs, acting as domain expert.
An initial annotation pass identified 20 classes; after an error analysis, semantically overlapping classes were merged into the 16 definitive classes published here.
Preprocessing
The raw e-mails were stored in an Outlook PST backup (~800 MB) of the mailbox that receives the queries; the sent folder was used, since each sent message contains the student's query together with the staff's reply. The full pipeline is available as a notebook in the GitHub repository; in summary:
- The PST file was decompressed and iterated with
libpff, extracting the plain-text body of each message. - Text-encoding issues (accented characters) were fixed; the text was lowercased, and line breaks and special characters were removed.
- The student's query was separated from the staff's reply using the
-----mensaje original-----token; threads with more than one interaction were discarded. - Headers/footers unrelated to the content of the query (security boilerplate) were removed, and each message was structured into fields (date, time, academic data, query, reply).
The train/test split (80/20) is the one used in the associated publications and was stratified by class, so all 16 classes appear in both splits.
Classes
The 16 classes and their meaning (class names are kept in Spanish, as published):
| # | Class | Topic of the query |
|---|---|---|
| 1 | Boleto Universitario | Student transport subsidy (fare discount) |
| 2 | Cambio de Carrera | Switching to a different degree program |
| 3 | Cambio de Comisión | Changing course section/schedule after enrollment |
| 4 | Consulta por Equivalencias | Credit transfer from other universities/programs |
| 5 | Consulta por Legajo | Student file number (legajo) issues |
| 6 | Consulta sobre Título Universitario | Degree certificate: requirements, procedure, timing |
| 7 | Cursadas | Coursework: enrollment deadlines, course offer, prerequisites |
| 8 | Datos Personales | Updating or correcting personal data |
| 9 | Exámenes | Final exams: registration, offer, attendance |
| 10 | Ingreso a la Universidad | Admission of new students (aspirantes) |
| 11 | Pedido de Certificados | Requests for enrollment/academic certificates |
| 12 | Problemas con la Clave | Password generation/reset for the web system |
| 13 | Reincorporación | Re-admission after losing regular-student status |
| 14 | Requisitos de Ingreso | Documentation required to complete admission |
| 15 | Simultaneidad de Carreras | Studying two degree programs simultaneously |
| 16 | Situación Académica | Grades recording, promotion checks, academic record |
Class distribution
The dataset is highly imbalanced: the largest class holds ~24% of the instances, while the smallest ones have fewer than 10.
| Class | Train | Test | Total |
|---|---|---|---|
| Boleto Universitario | 193 | 48 | 241 |
| Ingreso a la Universidad | 135 | 33 | 168 |
| Requisitos de Ingreso | 98 | 24 | 122 |
| Problemas con la Clave | 91 | 23 | 114 |
| Cursadas | 75 | 19 | 94 |
| Pedido de Certificados | 59 | 15 | 74 |
| Reincorporación | 43 | 11 | 54 |
| Situación Académica | 22 | 6 | 28 |
| Exámenes | 18 | 5 | 23 |
| Consulta por Legajo | 15 | 3 | 18 |
| Cambio de Carrera | 11 | 2 | 13 |
| Consulta por Equivalencias | 10 | 3 | 13 |
| Consulta sobre Título Universitario | 10 | 3 | 13 |
| Cambio de Comisión | 8 | 2 | 10 |
| Datos Personales | 6 | 2 | 8 |
| Simultaneidad de Carreras | 6 | 1 | 7 |
| Total | 800 | 200 | 1000 |
Dataset structure
Each instance contains the preprocessed query text, 22 static attributes derived from the e-mail metadata and text (useful as complementary features or for analysis), and the label.
| Column | Type | Description |
|---|---|---|
consulta |
string | Preprocessed text of the student's query (lowercased, cleaned) |
dia_semana |
int | Day of week the e-mail was sent (1 = Monday … 7 = Sunday) |
semana_del_mes |
int | Week of the month (1–5) |
mes |
int | Month (1–12) |
cuatrimestre |
int | Academic term of the year (1–3) |
anio |
int | Year |
hora_discretizada |
int | Time of day: 0 = morning (6–12), 1 = early afternoon (12–16), 2 = afternoon (16–20), 3 = night (20–00), 4 = late night (00–06) |
dni_discretizado |
int | National ID number discretized by quantiles (proxy for student age) |
legajo_discretizado |
int | Student file number discretized by quantiles (proxy for seniority at the university) |
posee_legajo |
int | 1 if the student provided their file number, 0 otherwise |
posee_telefono |
int | 1 if the student provided a phone number, 0 otherwise |
carrera_valor |
int | Degree-program code (e.g., 3 = Lic. en Administración, 5 = Lic. en Trabajo Social, 54 = Contador Público) |
proveedor_correo |
int | E-mail provider code (e.g., 4 = hotmail, 6 = gmail) |
cantidad_caracteres |
int | Number of characters in the query |
proporcion_mayusculas |
float | Proportion of uppercase characters |
proporcion_letras |
float | Proportion of letters over total characters |
cantidad_tildes |
int | Number of accented characters |
cantidad_palabras |
int | Number of words |
cantidad_palabras_cortas |
int | Number of short words (up to 4 characters) |
proporcion_palabras_distintas |
float | Distinct-word ratio (lexical richness) |
frecuencia_signos_puntuacion |
float | Frequency of punctuation marks |
cantidad_oraciones |
int | Number of sentences |
utiliza_codigo_asignatura |
int | 1 if the query mentions a course code, 0 otherwise |
clase |
string | Label: topic of the query (16 classes) |
Example
{
"consulta": "quería saber por qué no puedo acceder al boleto estudiantil ya que resido a más de 2000m de la universidad",
"dia_semana": 6,
"mes": 3,
"anio": 2019,
"cantidad_palabras": 21,
"clase": "Boleto Universitario"
}
The unlabeled configuration
The unlabeled config contains 19,776 unlabeled e-mails from the same collection and preprocessing pipeline, with a single column, consulta (the preprocessed query text). This is the knowledge base from which the semi-supervised approach of the associated papers retrieves new instances per class to augment the labeled training set — see Fernández & Errecalde (2022; 2023) below.
The 1,000 manually labeled e-mails were excluded from this collection by construction (they were removed by exact text match when the export was generated), so the unlabeled corpus can be safely combined with the default train split without leaking test instances.
from datasets import load_dataset
unlabeled = load_dataset("jumafernandez/consultas-unlu", "unlabeled")
The retrieved-* configurations (semi-supervised)
The three retrieved-* configs are automatically labeled datasets produced by the semi-supervised strategy proposed in the associated papers. The methodology, for each config:
- Per-class feature selection. Starting from the 800 manually labeled training e-mails, the most characteristic terms of each of the 16 classes are extracted automatically with one of three techniques: coefficients of a Logistic Regression classifier (
retrieved-lr), TF-IDF term weights (retrieved-tfidf), or the confidence values of the SS3 text classifier (Burdisso et al., 2019) (retrieved-ss3). - Instance retrieval. The unlabeled knowledge base (the
unlabeledconfig) is indexed in a general-purpose search engine (Elasticsearch). For each class, a query built from its selected terms retrieves the most relevant e-mails, which are assigned that class as a pseudo-label. - Balanced dataset. The top 200 retrieved e-mails per class are kept, yielding a perfectly balanced dataset of 3,200 automatically labeled instances per technique.
In the papers, these datasets are used to augment the manually labeled training set (default train split), improving classifiers on the imbalanced task; the strategy is also evaluated as a re-balancing alternative to classic over/under-sampling. Note that the labels here are automatic (pseudo-labels), not ground truth — label noise is expected by design, and model evaluation should always be done on the manually labeled default test split.
The schema is the same as the default config, plus a score column with the Elasticsearch relevance score of each retrieved instance for its class query.
from datasets import load_dataset
retrieved = load_dataset("jumafernandez/consultas-unlu", "retrieved-ss3")
Variants of these datasets oriented to class re-balancing (boosting variants, which retrieve more instances for minority classes) are available in the GitHub repository.
Usage
from datasets import load_dataset
ds = load_dataset("jumafernandez/consultas-unlu")
print(ds["train"][0]["consulta"], "->", ds["train"][0]["clase"])
Personal and sensitive information
Direct identifiers present in the original e-mails (name, national ID, student file number, phone number, personal e-mail address) were removed or discretized before publication: dni_discretizado and legajo_discretizado only keep quantile bins, and provider/degree information is encoded as categorical codes.
Additionally, personal information that students disclosed themselves inside the free text of the query was replaced with placeholders in this release: [NOMBRE] (personal names), [EMAIL], [DNI] (national ID), [LEGAJO] (student file number), [TELEFONO], [DOMICILIO] (home address) and [NUMERO_GESTION] (a case-management number).
- In the
defaultconfig (1,000 e-mails), the affected instances (25) were reviewed manually. Note that the lexical attributes (cantidad_caracteres,cantidad_palabras, etc.) were computed on the original text, so in those few rows they may differ slightly from what would be recomputed on the anonymized text. - In the
unlabeledandretrieved-*configs, anonymization was automated (1,620 of the 19,776 unlabeled e-mails affected, and ~400 replacements per retrieved config): e-mail addresses, phone numbers and national IDs by pattern, student file numbers by keyword context, and each sender's own name matched against the message text. Automated anonymization at this scale is not exhaustive: occasional residual mentions (e.g., third-party names, or a file number written without context) may remain. As with thedefaultconfig, the lexical attributes of theretrieved-*configs were computed on the original text.
Please do not attempt to re-identify individuals, and report any residual personal information so it can be removed.
Considerations for using the data
- The class distribution is highly imbalanced; consider stratified evaluation and metrics beyond accuracy (e.g., macro-F1).
- Texts are short (≈110 characters on average) and informal, written by students without spelling or syntax supervision — they often contain typos and non-standard Spanish.
- The data reflects the administrative domain of one Argentine public university; models trained on it may not generalize to other domains or Spanish variants.
Citation
If you use this dataset, please cite:
@inproceedings{fernandez2022multi,
title={Multi-class E-mail Classification with a Semi-Supervised Approach Based on Automatic Feature Selection and Information Retrieval},
author={Fern{\'a}ndez, Juan Manuel and Errecalde, Marcelo},
booktitle={Conference on Cloud Computing, Big Data \& Emerging Topics},
pages={75--90},
year={2022},
organization={Springer}
}
Related publications
Other publications of the research project that used this dataset. In particular, the semi-supervised approach — automatic feature selection per class and instance retrieval from the unlabeled e-mail collection — is developed in the main paper above and in the CACIC paper below:
@inproceedings{fernandez2023instance,
title={Instance retrieval from non-labeled data as a strategy for automatic classification of imbalanced e-mail datasets},
author={Fern{\'a}ndez, Juan Manuel and Errecalde, Marcelo Luis},
booktitle={XXVIII Congreso Argentino de Ciencias de la Computaci{\'o}n (CACIC 2022, La Rioja, 3--6 October 2022)},
year={2023}
}
@inproceedings{fernandez2021classic,
title={Classic and recent (neural) approaches to automatic text classification: a comparative study with e-mails in the Spanish language},
author={Fernandez, Juan M and Cavasin, Nicol{\'a}s and Errecalde, Marcelo},
booktitle={Short Papers of the 9th Conference on Cloud Computing, Big Data \& Emerging Topics},
pages={20},
year={2021}
}
@inproceedings{fernandez2021clasificacion,
title={Clasificaci{\'o}n autom{\'a}tica de correos electr{\'o}nicos},
author={Fernandez, Juan M and Cavas{\'\i}n, Nicol{\'a}s and Rodriguez, Agust{\'\i}n and Errecalde, Marcelo},
booktitle={XXIII Workshop de Investigadores en Ciencias de la Computaci{\'o}n (WICC 2021)},
year={2021}
}
Scripts, notebooks and the M.Sc. thesis describing the full curation process are available in the GitHub repository.
Dataset curators
Juan Manuel Fernández (Universidad Nacional de Luján) and Marcelo Errecalde (Universidad Nacional de San Luis), within the research project "Clasificación Automática de Correos Electrónicos" (Disposición CDD-CB N°086/2020, Departamento de Ciencias Básicas, UNLu).
License
CC BY 4.0 — free to use and adapt with attribution.
- Downloads last month
- -