This model is trained from scratch to normalize historic spelling of German to contemporary one. It is type-based, which means that it takes only a single token (without whitespace) as input, and generates the normalized variant.
It achieves the following results on the evaluation set:
Loss: 0.0308
Wordacc: 0.9546
Wordacc Oov: 0.9096
Note: This model is part of a larger system, which uses an additional GPT-based model to disambiguate different normalization forms by taking in the full context. See
https://github.com/aehrm/hybrid_textnorm
.
Training and evaluation data
The model has been trained on the DTA-EC Parallel Corpus Lexicon (
aehrm/dtaec-lexica
), which is from a
parallel corpus
of the Deutsche Textarchiv (German Text Archive), who aligned historic prints of documents with their moden editions in contemporary orthography.
Training was done on type-level, where, given the historic form of a type, the model must predict the corresponding normalized type
that appeared most frequent in the parallel corpus
.
Demo Usage
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained('aehrm/dtaec-type-normalizer')
model = AutoModelForSeq2SeqLM.from_pretrained('aehrm/dtaec-type-normalizer')
# Note: you CANNOT normalize full sentences, only word for word!
model_in = tokenizer(['Freyheit', 'seyn', 'ſelbstthätig'], return_tensors='pt', padding=True)
model_out = model.generate(**model_in)
print(tokenizer.batch_decode(model_out, skip_special_tokens=True))
# >>> ['Freiheit', 'sein', 'selbsttätig']
dtaec-type-normalizer huggingface.co is an AI model on huggingface.co that provides dtaec-type-normalizer's model effect (), which can be used instantly with this aehrm dtaec-type-normalizer model. huggingface.co supports a free trial of the dtaec-type-normalizer model, and also provides paid use of the dtaec-type-normalizer. Support call dtaec-type-normalizer model through api, including Node.js, Python, http.
dtaec-type-normalizer huggingface.co is an online trial and call api platform, which integrates dtaec-type-normalizer's modeling effects, including api services, and provides a free online trial of dtaec-type-normalizer, you can try dtaec-type-normalizer online for free by clicking the link below.
aehrm dtaec-type-normalizer online free url in huggingface.co:
dtaec-type-normalizer is an open source model from GitHub that offers a free installation service, and any user can find dtaec-type-normalizer on GitHub to install. At the same time, huggingface.co provides the effect of dtaec-type-normalizer install, users can directly use dtaec-type-normalizer installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
dtaec-type-normalizer install url in huggingface.co: