Skip to main content

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):

more info will be added later.


🚀 Usage

Below is a quick way to get up and running with the model.

  1. First, install the package.
pip install TextPunctuator
  1. 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)

Uploaded Source

Built Distribution

TextPunctuator-1.0.5-py3-none-any.whl (4.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page