metadata
language: en
tags:
- sentence correction
- text-generation
license: cc-by-nc-sa-4.0
datasets:
- jfleg
Model
This model utilises T5-base sentence correction pre-trained model. It was fine tuned using JFLEG dataset and Happy Transformer framework. This model was pre-trained for educational purposes only for correction on local caribbean dialect. .
Re-training/Fine Tuning
The results of fine-tuning resulted in a final accuracy of 90%
Usage
from happytransformer import HappyTextToText, TTSettings
pre_trained_model="T5"
model = HappyTextToText(pre_trained_model, "KES/T5-KES")
arguments = TTSettings(num_beams=4, min_length=1)
sentence = "Wat iz your nam"
correction = model.generate_text("grammar: "+sentence, args=arguments)
if(correction.text.find(" .")):
correction.text=correction.text.replace(" .", ".")
print(correction.text) # Correction: "What is your name?".