Important
This repository is the result of a university project undertaken as part of the Software Development course in the Master’s program in Natural Language Processing at the University of Lorraine, Nancy.
Please note that the project may lack the technical robustness required for production use. It should be considered as an educational exercise rather than a polished, production-ready solution.
GECko+ is an English language assisting tool that corrects mistakes of various types on written texts. While many well-settled pieces of software of its kind correct mistakes at the grammatical level (orthography and syntax), our pipeline allows the tool to perform corrections both at grammatical and at discourse level.
Note
- The grammatical correction uses GECToR
- The discourse correction consists of a sentence-reordering mechanism only, based on this paper. This feature can be disabled, as sentence reordering may not be the most effective method for correcting discourse. It was implemented primarily to explore an original approach for our university project.
Original text | Corrected text |
---|---|
Whoever is happy wil make other persons happy to. | Whoever is happy will make other people happy too. |
The weather was so nice! Yesterday I go to beach. | Yesterday I went to the beach. The weather was so nice! |
The wood are lovely, dark,, and deep. And miles to go before I sleep. But I have promises to keep. | The woods are lovely, dark, and deep. But I have promises to keep. And miles to go before I sleep. |
Fool me twice, shame on me. Fool me once, shame on you. | Fool me once, shame on you. Fool me twice, shame on me. |
Secondy, prepare the pan using oil and butter. Then, put onions and carrots together with salt an pepper, inside the pan. Lastly, let them cooked for 15 minutes, and remove off the food fom the pan. First of all, cut some onions and carrots. | First of all, cut some onions and carrots. Secondly, prepare the pan using oil and butter. Then, put the onions and carrots together with salt and pepper, inside the pan. Lastly, let them cook for 15 minutes, and remove the food from the pan. |
-
Clone the repository.
-
Create a virtual environment with Python 3.7.
-
Install the requirements files
pip install -r requirements.txt
. If it doesn't work, the following can be a workaround:python3.7 -m pip install -r requirements.txt
-
Download the models by executing:
mkdir -p application/models/gector/data/model_files && cd application/models/gector/data/model_files && curl -O https://grammarly-nlp-data-public.s3.amazonaws.com/gector/xlnet_0_gector.th
.mkdir -p application/models/sentence_reorder && cd application/models/sentence_reorder/ && curl -O http://tts.speech.cs.cmu.edu/sentence_order/nips_bert.tar && tar -xf nips_bert.tar && rm nips_bert.tar && mv nips_bert/ model/
.
-
Run the web app locally by executing
run.py
. The default development URL ishttp://127.0.0.1:5000/
.
- Build the Docker image:
docker build -t gecko-app .
. - Run the image:
docker run -d -p 3000:80 gecko-app
. The URL will behttp://0.0.0.0:3000/
.
Our tool implements the two following models, for tackling, respectively, grammatical and discourse errors:
- Kostiantyn Omelianchuk, Vitaliy Atrasevych, Artem Chernodub and Oleksandr Skurzhanskyi "GECToR -- Grammatical Error Correction: Tag, Not Rewrite". In Proceedings of the Fifteenth Workshop on Innovative Use of NLP for Building Educational Applications. [arXiv]
- Prabhumoye, Shrimai, Ruslan Salakhutdinov, and Alan W. Black. "Topological Sort for Sentence Ordering." In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics. [arXiv]
The paper describing GECko+ is finally out! If you find this tool useful in your research, please consider citing it:
@inproceedings{calo-etal-2021-gecko,
title = "{GEC}ko+: a Grammatical and Discourse Error Correction Tool",
author = "Cal{\`o}, Eduardo and
Jacqmin, L{\'e}o and
Rosemplatt, Thibo and
Amblard, Maxime and
Couceiro, Miguel and
Kulkarni, Ajinkya",
booktitle = "Actes de la 28e Conf{\'e}rence sur le Traitement Automatique des Langues Naturelles. Volume 3 : D{\'e}monstrations",
month = "6",
year = "2021",
address = "Lille, France",
publisher = "ATALA",
url = "https://aclanthology.org/2021.jeptalnrecital-demo.3",
pages = "8--11",
abstract = "We introduce GECko+, a web-based writing assistance tool for English that corrects errors both at the sentence and at the discourse level. It is based on two state-of-the-art models for grammar error correction and sentence ordering. GECko+ is available online as a web application that implements a pipeline combining the two models.",
}
We accept contributions, whether they intend to fix an issue or to add new functionalities. Don't hesitate to submit a pull request!
The software is distributed under Common Creative 4.0 license.