This repository contains a complete Natural Language Processing (NLP) pipeline for grammatical error correction (GEC) using a Transformer-based architecture.
The project is divided into two stages:
- Model Training – Fine-tuning a T5-small model using the JFLEG dataset.
- Model Deployment – Interactive grammar correction application built with Gradio.
├── Modelo_final_H7_Deep_Learning.ipynb │ └── Training, fine-tuning, and evaluation of the T5 model
├── Corrector_ortográfico.ipynb │ └── Interactive application for testing the trained model
└── README.md
The objective of this project is to automatically correct grammatical, spelling, and fluency errors in English sentences while preserving their original meaning.
The system was trained using the JFLEG (JHU Fluency-Extended GUG Corpus) dataset and implemented with the Hugging Face Transformers framework.
- Grammar correction
- Spelling correction
- Sentence fluency improvement
- Fine-tuned T5 Transformer
- Hugging Face integration
- Interactive Gradio interface
- End-to-end NLP pipeline
- Python
- PyTorch
- Hugging Face Transformers
- Hugging Face Datasets
- Gradio
- SentencePiece
- Jupyter Notebook
This project uses the JFLEG dataset, a benchmark dataset designed for grammatical error correction and sentence fluency enhancement.
Dataset: https://huggingface.co/datasets/jhu-clsp/jfleg
The notebook Modelo_final_H7_Deep_Learning.ipynb includes:
- Dataset loading
- Data preprocessing
- Reference expansion
- Tokenization
- Fine-tuning T5-small
- Model evaluation
- Model export
The notebook Corrector_ortográfico.ipynb demonstrates how to:
- Load the trained model
- Perform inference
- Correct user-entered text
- Deploy a simple web interface using Gradio
The trained model can be downloaded from:
Input:
She go to school every day.
Output:
She goes to school every day.
Daniel Torres
Multimedia Engineer / Deep Learning Project