Downloads · 30 days
14
2% of all-time downloads
rabiyulfahim/grammerchecking
grammerchecking is a machine learning model from rabiyulfahim. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as cc-by-nc-sa-4.0.
This model generates a revised version of inputted text with the goal of containing fewer grammatical errors. It was trained with Happy Transformer using a dataset called JFLEG. Here's a full article on how to train a…
Downloads · 30 days
14
2% of all-time downloads
All-time downloads
575
Public
Repo size
1.8 GB
Likes
1
Public
Click a slice to open those files.
.bin892 MB · 100%
From the Hugging Face model README
This model generates a revised version of inputted text with the goal of containing fewer grammatical errors. It was trained with Happy Transformer using a dataset called JFLEG. Here's a full article on how to train a similar model.
pip install happytransformer
from happytransformer import HappyTextToText, TTSettings
happy_tt = HappyTextToText("T5", "vennify/t5-base-grammar-correction")
args = TTSettings(num_beams=5, min_length=1)
# Add the prefix "grammar: " before each input
result = happy_tt.generate_text("grammar: This sentences has has bads grammar.", args=args)
print(result.text) # This sentence has bad grammar.