| --- |
| language: |
| - de |
| - gmh |
| library_tags: |
| - transformers |
| - torch |
| tags: |
| - text-generation |
| - mt5 |
| - middle-high-german |
| - normalization |
| pipeline_tag: text-generation |
| base_model: google/mt5-base |
| --- |
| |
| # normaere-model |
|
|
| Transformer-based seq2seq normalizer for Middle High German (MHG) text, fine-tuned from `google/mt5-base`. |
|
|
| ## Model Details |
|
|
| - **Base Model:** google/mt5-base (580M parameters) |
| - **Architecture:** MT5ForConditionalGeneration (encoder-decoder) |
| - **Precision:** FP16 |
| - **Max Sequence Length:** 512 tokens |
| - **Vocabulary Size:** 250,117 (augmented with medieval abbreviation characters) |
|
|
| ## Intended Uses |
|
|
| Normalizes Middle High German texts (ca. 1050–1500) according to the standards of the Referenzkorpus Mittelhochdeutsch (ReM): |
|
|
| - Solves common abbreviations |
| - Splits off and expands common pro- and enclitics |
| - Applies editorial post-processing |
|
|
| ## Training Data |
|
|
| Fine-tuned on the Referenzkorpus Mittelhochdeutsch (ReM), Version 2.1. |
|
|
| ## Usage |
|
|
| ```python |
| from transformers import AutoTokenizer, AutoModelForSeq2SeqLM |
| |
| tokenizer = AutoTokenizer.from_pretrained("JonasHermann/normaere-model") |
| model = AutoModelForSeq2SeqLM.from_pretrained("JonasHermann/normaere-model") |
| |
| input_text = "die stete wârheit" |
| inputs = tokenizer(input_text, return_tensors="pt") |
| outputs = model.generate(**inputs) |
| result = tokenizer.decode(outputs[0], skip_special_tokens=True) |
| ``` |
|
|
| ## References |
|
|
| - mT5: [Xue et al., 2021](https://arxiv.org/abs/2010.11934) |
| - Training corpus: Roussel, Adam; Klein, Thomas; Dipper, Stefanie; Wegera, Klaus-Peter; Wich-Reif, Claudia (2024). Referenzkorpus Mittelhochdeutsch (1050–1350), Version 2.1, https://www.linguistics.ruhr-uni-bochum.de/rem/. ISLRN 937-948-254-174-0. |