Downloads · 30 days
17
3% of all-time downloads
modernisa/modernisa-byt5-base
modernisa-byt5-base is a text generation model from modernisa. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
This model translates from historical, non-normalized Spanish with historical orthography to modern normalized Spanish. It is a fine-tuned version of the multilingual version of the text-totext transformer ByT5 (Xue e…
Downloads · 30 days
17
3% of all-time downloads
All-time downloads
520
Public
Parameters
582M
4.7 GB on disk
Likes
0
Public
Click a slice to open those files.
.bin2.3 GB · 50%
From the Hugging Face model README
This model translates from historical, non-normalized Spanish with historical orthography to modern normalized Spanish. It is a fine-tuned version of the multilingual version of the text-totext transformer ByT5 (Xue et al, 2021, 2022) fro translation from 17th century Spanish to modern Spanish.
<!-- # Table of Contents - [Model Card for modernisa-byt5-base](#model-card-for--model_id-) - [Table of Contents](#table-of-contents) - [Table of Contents](#table-of-contents-1) - [Model Details](#model-details) - [Model Description](#model-description) - [Uses](#uses) - [Direct Use](#direct-use) - [Downstream Use [Optional]](#downstream-use-optional) - [Out-of-Scope Use](#out-of-scope-use) - [Bias, Risks, and Limitations](#bias-risks-and-limitations) - [Recommendations](#recommendations) - [Training Details](#training-details) - [Training Data](#training-data) - [Training Procedure](#training-procedure) - [Preprocessing](#preprocessing) - [Speeds, Sizes, Times](#speeds-sizes-times) - [Evaluation](#evaluation) - [Testing Data, Factors & Metrics](#testing-data-factors--metrics) - [Testing Data](#testing-data) - [Factors](#factors) - [Metrics](#metrics) - [Results](#results) - [Model Examination](#model-examination) - [Environmental Impact](#environmental-impact) - [Technical Specifications [optional]](#technical-specifications-optional) - [Model Architecture and Objective](#model-architecture-and-objective) - [Compute Infrastructure](#compute-infrastructure) - [Hardware](#hardware) - [Software](#software) - [Citation](#citation) - [Glossary [optional]](#glossary-optional) - [More Information [optional]](#more-information-optional) - [Model Card Authors [optional]](#model-card-authors-optional) - [Model Card Contact](#model-card-contact) - [How to Get Started with the Model](#how-to-get-started-with-the-model) -->This model translates from historical, non-normalized Spanish with historical orthography to modern normalized Spanish. It is a fine-tuned version of the multilingual version of the text-to-text transformer ByT5 (Xue et al, 2021, 2022) for translation from 17th century Spanish to modern Spanish. A fine-tuned version of google/byt5-base trained on a parallel corpus of 44 Spanish-language Golden Age dramas.
The motivation to develop the model was to provide a tool producing normalized text which enables computational analyses (such as distances between texts, clustering, topic modeling, sentiment analysis, stylometry etc.), to facilitate modern editions of historical texts and thus alleviate a job which been done manually so far and to provide a resource which may be used by historians and editors who manually transcribe texts produced in the 17th century which were not yet digitized, which are available in cultural heritage institutions, especially libraries and archives. While all the dramas used are written in verses, the model was not tested on texts in prose; the quality of the translation of prose texts into modern normalized Spanish might therefore differ significantly from the satisfying results achieved with dramas in verses.
This resource may be used by historians and editors who manually transcribe texts produced in the 17th century which were not yet digitized and which are typically available in cultural heritage institutions, especially libraries and archives.
This model is already fine-tuned.
It has to be underlined that the parallel corpus was created solely from text written by four men who lived in counter-reformatory Spain during the rule of inquisition. The view of the world of these dramatists is from our contemporary point of view outdated, strongly patriarchal, misogynist and discriminatory with respect to non-catholic human beings.
The intended users of this model are researchers and editors of historical texts. We cannot imagine any harm done by the modernization of those texts as a technical process; however, the reading of such texts may be harmful for persons who are not acquainted with the worldview produced in 17th century Spain. Moreover, linguistic change provides a strong challenge to Natural Language Processing (NLP) applications. Vis-à-vis other languages, linguistic change within the Spanish language was not very pronounced. Further research on the modernization of historical languages is therefore strongly recommended.
We built a parallel corpus of Spanish Golden Age theater texts with pairs of 44 Golden Age dramas in historical orthography and current orthography. Both corpora were aligned line by line to establish a ground truth for the translation between the different historical varieties of Spanish. The 44 dramas have been written by Juan Ruiz de Alarcón (5), Pedro Calderón de la Barca (28), Félix Lope de Vega Carpio (6), and Juan Pérez de Montalbán (5). The dataset is available on Huggingface.
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Bleu | Gen Len |
|---|---|---|---|---|---|
| 0.1474 | 0.35 | 10000 | 0.1360 | 42.8789 | 18.4441 |
| 0.1328 | 0.71 | 20000 | 0.1303 | 43.5394 | 18.4368 |
| 0.1216 | 1.06 | 30000 | 0.1245 | 44.1557 | 18.4384 |
| 0.1167 | 1.42 | 40000 | 0.1219 | 44.1961 | 18.4449 |
| 0.1065 | 1.77 | 50000 | 0.1192 | 44.7353 | 18.443 |
| 0.099 | 2.13 | 60000 | 0.1195 | 44.522 | 18.4524 |
| 0.088 | 2.48 | 70000 | 0.1192 | 44.8243 | 18.4441 |
| 0.0907 | 2.84 | 80000 | 0.1176 | 44.888 | 18.4465 |
After randomizing all 141,023 lines in the corpus, we split it into training (80%), validation (10%) and test (10%) sets stratifying by play. We then fine-tuned T5 and ByT5 base models on sequence lengths of 256 doing a grid search for 3 and 5 epochs, weight decay 0 and 0.01, learning rates of 0.001 and 0.0001, and with and without a “translate” prompt.
A single drama by Lope de Vega (Castelvines y Monteses, 1647).
More information needed
More information needed
BLEU: 80.66 CER: 4.20%
More information needed
Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).
More information needed
More information needed
More information needed
More information needed
BibTeX:
@inproceedings{de_la_rosa_modernilproject_2022,
address = {Tokyo},
title = {The {Moderniſa} {Project}: {Orthographic} {Modernization} of {Spanish} {Golden} {Age} {Dramas} with {Language} {Models}},
shorttitle = {The {Moderniſa} {Project}},
url = {https://dh2022.dhii.asia/abstracts/files/DE_LA_ROSA_Javier_The_Moderni_a_Project__Orthographic_Modern.html},
language = {en},
publisher = {Alliance of Digital Humanities Organizations ADHO / The University of Tokyo, Japan},
author = {De la Rosa, Javier and Cuéllar, Álvaro and Lehmann, Jörg},
month = jul,
year = {2022},
}
APA:
De la Rosa, J., Cuéllar, Á., & Lehmann, J. (2022, July). The Moderniſa Project: Orthographic Modernization of Spanish Golden Age Dramas with Language Models. Retrieved from https://dh2022.dhii.asia/abstracts/files/DE_LA_ROSA_Javier_The_Moderni_a_Project__Orthographic_Modern.html
MLA:
De la Rosa, Javier, et al. The Moderniſa Project: Orthographic Modernization of Spanish Golden Age Dramas with Language Models. Alliance of Digital Humanities Organizations ADHO / The University of Tokyo, Japan, 2022, https://dh2022.dhii.asia/abstracts/files/DE_LA_ROSA_Javier_The_Moderni_a_Project__Orthographic_Modern.html.
More information needed
More information needed
Javier de la Rosa, Jörg Lehmann, questions and comments about the model card can be directed to Jörg Lehmann at [email protected]
Use the code below to get started with the model.
<details> <summary> Click to expand </summary>More information needed
</details>