đ Text Punctuator Based on Transformers model T5.
T5 model fine-tuned for punctuation restoration. Model currently supports only French Language. More language supports will be added later using mT5.
Train Datasets : Model trained using 2 french datasets (around 500k records):
- orange_sum
- mlsum (only french text)
More info will be added later.
đ Usage
TextPunctuator as a wrapper of the model.
- Install the package.
pip install TextPunctuator
- Simple example
from Punctuator import TextPunctuator
punctuator = TextPunctuator(use_gpu=False)
# text input
text = "Sur la base de ces échanges Blake Lemoine a donc jugé que le systÚme avait atteint \
un niveau de conscience lui permettant d'ĂȘtre sensible Ce dernier a ensuite envoyĂ© \
par email un rapport sur la sensibilité supposée de LaMDA à deux cents employés de \
Google TrĂšs vite les dirigeants de lâentreprise ont rejetĂ© les allĂ©gations"
text_punctuated = punctuator.punctuate(text, lang='fr')
text_punctuated
# output :
""" Sur la base de ces échanges, Blake Lemoine a donc jugé que le systÚme avait atteint un niveau de
conscience lui permettant dâĂȘtre sensible. Ce dernier a ensuite envoyĂ© par email un rapport sur
la sensibilité supposée de LaMDA à deux cents employés de Google. TrÚs vite, les dirigeants de
lâentreprise ont rejetĂ© les allĂ©gations. """
â Contact
Contact Zakarya ROUZKI or at Linkedin.