Giter Site home page Giter Site logo

yassin522 / english-grammar-error-correction Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 2.48 MB

The project focuses on leveraging state-of-the-art natural language processing techniques, including the T5 model and a custom Encoder-Decoder architecture, to automatically detect and correct grammatical errors in written English text.

Jupyter Notebook 99.96% Python 0.04%
encoder-decoder grammar grammar-error-correction jupyter-notebook python t5-model

english-grammar-error-correction's Introduction

English Grammar Error Correction Project

Overview

This project focuses on the development of an English grammar error correction system using the T5 model and implementing an Encoder-Decoder architecture from scratch. The goal is to create a robust and efficient tool that can automatically detect and correct grammatical errors in written English text.

Features

  • T5 Model Integration: The project leverages the Transformer-based T5 (Text-to-Text Transfer Transformer) model, known for its ability to handle a wide range of natural language processing tasks. The T5 model is fine-tuned specifically for English grammar error correction.

  • Encoder-Decoder Architecture: In addition to the pre-trained T5 model, we have implemented an Encoder-Decoder architecture from scratch. This architecture enhances the model's understanding of contextual information and aids in generating accurate corrections for grammatical errors.

  • User-Friendly Interface: The system is designed with a user-friendly interface, allowing users to input text and receive corrected output seamlessly. The interface provides a simple yet effective way to interact with the correction system.

Model Training

  • Fine-Tuning T5 Model: The T5 model is fine-tuned on a dataset containing annotated examples of grammatical errors. This ensures that the model is tailored to the specific task of English grammar correction.

  • Encoder-Decoder Training: The Encoder-Decoder architecture is trained on a parallel corpus of correct and incorrect sentences. The training process involves optimizing the model's parameters to minimize the difference between the predicted corrected sentence and the ground truth.

  • Embedding Model: We utilized the wiki-news-300d-1M.vec pre-trained embedding model to enhance the representation of words in the input text.

https://www.kaggle.com/datasets/pablomarino/wikinews300d1msubwordvec
  • Encoder-Decoder Training Results:
311/311 [==============================] - 8213s 26s/step - loss: 0.1656 - f_beta_score: 0.6820 - val_loss: 0.1498 - val_f_beta_score: 0.6787
  • T5 Training Results:
step Training Loss Validation Loss Gleu
250 No log 0.732383 10.8529
500 0.841700 0.699691 12.1853
1000 0.742300 0.676036 13.4657
1250 0.742300 0.670769 13.6931
1500 0.729500 0.668988 13.7441

Evaluation

The performance of the grammar correction system is evaluated using metrics such as precision, recall, and F1 score, Gleu.

Dataset

The training dataset can be found here:

https://www.kaggle.com/datasets/studentramya/lang-8?select=lang8.train.auto.bea19.m2

It includes annotated examples of grammatical errors for optimizing the model's performance in English grammar correction

Screenshot (2212)

english-grammar-error-correction's People

Contributors

yassinabdulmahdi avatar yassin522 avatar

Stargazers

Mohammad Issawi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.