A package to punctuate text, currently supporting French text, more languages comming soon.
Project description
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
Below is a quick way to get up and running with the model.
- First, install the package.
pip install TextPunctuator
- Sample python code.
from Punctuator import TextPunctuator
punctuator = TextPunctuator(use_gpu=False)
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
# Outputs the following:
# 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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
TextPunctuator-1.0.5.tar.gz
(4.5 kB
view hashes)
Built Distribution
Close
Hashes for TextPunctuator-1.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7db32d6939d6616901aaf7f09217864cbdd259b8540f42955f834a2485e84687 |
|
MD5 | baa409dc46a151b01d68f013163be939 |
|
BLAKE2b-256 | 9e6ae3adaeb68ed87007fc1daa6f16573c24aea21fb202e90acc6bf1786b3a6e |