File size: 1,124 Bytes
ee6a09d b0605aa 2ce5f89 8777d16 b0605aa |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
---
license: mit
---
.
# Spanish truecasing model
This is a Spanish truecasing-model that works with the <b>Dalton Fury</b> Python project:
https://github.com/daltonfury42/truecase
You can install it here:
https://pypi.org/project/truecase/
## Quick start
To use the Spanish model use the TrueCase.py file uploaded to this repository
https://huggingface.co/HURIDOCS/spanish_truecasing/blob/main/TrueCaser.py
Install the requirements:
pip install nltk
And ready to work:
from TrueCaser import TrueCaser
model_path = "spanish.dist"
spanish_truecasing = TrueCaser(model_path)
text = 'informe no.78/08. petición 785-05 admisibilidad. vicente arturo villanueva ortega y otros.'
print(spanish_truecasing.get_true_case(text))
## Notes
The model was trained with the Europarl dataset that contains transcriptions of the European Parliament discusions:
https://www.statmt.org/europarl/
Europarl: A Parallel Corpus for Statistical Machine Translation, Philipp Koehn, MT Summit 2005
Using huggingface load_dataset:
europarl = load_dataset('large_spanish_corpus', name='Europarl') |