Smart-Assess
Collection
Auto grading (FYP)
β’
1 item
β’
Updated
This is a grammar correction model based on the Google T5 architecture, fine-tuned on the JHU-CLSP/JFLEG dataset for text correction tasks. βοΈ
This model is designed to correct grammatical errors in English sentences. It was fine-tuned using the JFLEG dataset, which provides examples of grammatically correct sentences.
This model can be directly used to correct grammar and spelling mistakes in sentences. β
Here's a basic code snippet to demonstrate how to use the model:
from transformers import T5ForConditionalGeneration, T5Tokenizer
# Load the model and tokenizer
model_name = "samadpls/t5-base-grammar-checker"
tokenizer = T5Tokenizer.from_pretrained(model_name)
model = T5ForConditionalGeneration.from_pretrained(model_name)
# Example input
example_1 = "grammar: This sentences, has bads grammar and spelling!"
# Tokenize and generate corrected output
inputs = tokenizer.encode(example_1, return_tensors="pt")
outputs = model.generate(inputs)
corrected_sentence = tokenizer.decode(outputs[0], skip_special_tokens=True)
print("Corrected Sentence:", corrected_sentence)
The model was trained on the JHU CLSP JFLEG dataset, which includes various examples of sentences with grammatical errors and their corrections. π
Step | Training Loss | Validation Loss |
---|---|---|
1 | 0.9282 | 0.6091 |
2 | 0.6182 | 0.5561 |
3 | 0.6279 | 0.5345 |
4 | 0.6345 | 0.5147 |
5 | 0.5636 | 0.5076 |
6 | 0.6009 | 0.4928 |
7 | 0.5469 | 0.4950 |
8 | 0.5797 | 0.4834 |
9 | 0.5619 | 0.4818 |
10 | 0.6342 | 0.4788 |
11 | 0.5481 | 0.4786 |
For inquiries, please contact Abdul Samad Siddiqui via GitHub. π¬
Base model
google-t5/t5-base