Logo Lanfrica

IThioye/Wolof-Auto-Corrector

Domaine:

natural language processing

Type de record:

software
Créateur:
ITh
Hôte:
# **Wolof Auto-Corrector** Deep-learning–based automatic spelling correction system for Wolof words and sentences. This project trains and evaluates **character-level sequence-to-sequence models** (LSTM and Transformer) to automatically correct misspellings in the Wolof language. It is designed to work on *word-level spelling variations* such as: ``` thiow → coow gnibbi → ñibbi doundale → dundal niémé → ñeme ``` The system can also correct **entire sentences**, preserving correct words and correcting only those that need it. --- ## ✨ **Features** * ✔ Character-level **LSTM Seq2Seq model** * ✔ Character-level **Transformer Seq2Seq model** * ✔ Custom **edit-distance–based dataset** * ✔ Checkpoint saving/loading (`.pt` files) * ✔ GPU acceleration (CUDA available) * ✔ Sentence-level correction * ✔ Skip correction for words that are already correct * ✔ Support for ` `, ` `, ` `, ` ` tokens * ✔ Easy batch training + evaluation * ✔ Modular code structure --- ## 🧠 **Model Architectures** ### **1. LSTM Seq2Seq** * Encoder: embedding + LSTM * Decoder: LSTM + linear output layer * Autoregressive decoding * Performs very well on small datasets ### **2. Transformer Spell Model** * Multi-head self-attention * Positional embeddings * Encoder–decoder architecture * Causal masks for autoregressive decoding * Padding masks support * Useful for larger datasets or more complex corrections --- ## 📁 **Dataset Format** The dataset consists of lines in the following pattern: ``` correct_word: misspelling1 misspelling2 misspelling3 ... ``` Example: ``` sàdd: sadd dajale: dadiale dadialé dadjalé iñaan: ignane ignaan ignaane ñeenteel: nieentéel gneentéel nieentel gneentel ``` During training: * Correct words serve as the **target** sequence * Misspelled words serve as **input** sequences * Multiple variations per word increase robustness --- ## 🚀 **Installation** ```bash git clone github.com cd Wolof-Auto-Corrector python -m ven …