fdemelo's picture
Update README.md
3aba311 verified
|
raw
history blame
1.24 kB
metadata
language: fr
tags:
  - grammar
  - text2text-generation
license: mit
datasets:
  - fdemelo/spelling-correction-french-news

T5 Spelling Correction (French)

This model corrects spelling and punctuation problems of the input text (in French). It was trained on a synthetic dataset based on a French news corpus (2023) provided by the University of Leipzig using Happy Transformer. The base model used for training is airKlizz/t5-base-multi-fr-wiki-news. The following article was used as reference full article.

Usage

pip install happytransformer

from happytransformer import HappyTextToText, TTSettings

happy_tt = HappyTextToText("T5", "fdemelo/t5-base-spell-correction-fr")

args = TTSettings(num_beams=5, min_length=1)

# Add the prefix "grammaire: " before each input 
result = happy_tt.generate_text("grammaire: Le vehicule a tombe encontrebas", args=args)

print(result.text)  # corrected sentence