|
--- |
|
license: mit |
|
language: |
|
- en |
|
- fr |
|
metrics: |
|
- bleu |
|
library_name: transformers |
|
pipeline_tag: translation |
|
--- |
|
|
|
# French to English Machine Translation |
|
|
|
- **Author:** Kamelia Zaman Moon |
|
- **Project link:** https://huggingface.co/spaces/KameliaZaman/French-to-English-Translation |
|
- **Language(s):** Python |
|
- **License:** MIT |
|
- **Contact:** kamelia.stu2017@juniv.edu |
|
|
|
## Table of Contents |
|
- [Introduction](#introduction) |
|
- [Model Architecture](#model-architecture) |
|
- [How-to Guide](#how-to-guide) |
|
- [License](#license) |
|
- [Contributors](#contributors) |
|
|
|
## 1. Introduction |
|
This project aims to develop a machine translation system for translating French text into English. The system utilizes state-of-the-art neural network architectures and techniques in natural language processing (NLP) to accurately translate French sentences into their corresponding English equivalents. |
|
|
|
## 2. Model Architecture |
|
The machine translation model employs a sequence-to-sequence architecture, specifically utilizing a recurrent neural network (RNN) with an attention mechanism. The model is trained on a parallel corpus consisting of aligned French and English sentences. Key components of the model include encoder and decoder networks, attention mechanism, and tokenization for text processing. |
|
``` |
|
ββ eng_-french.csv - text dataset. |
|
|
|
ββ french_to_english_translator.h5 - generated model. |
|
|
|
ββ french_to_english_translation_using_seq2seq.ipynb - preprocesses input, trains, saves and evaluates the model. |
|
|
|
ββ app.py - this module starts the app interface. |
|
|
|
ββ README.md - readme file of this project. |
|
|
|
ββ requirements.txt - list of required packages. |
|
``` |
|
|
|
## 3. How-to Guide |
|
### 3.1. Data Preparation |
|
- The parallel corpus containing French and English sentences is preprocessed. |
|
- Text is tokenized and converted into numerical representations suitable for input to the neural network. |
|
|
|
### 3.2. Model Training |
|
- The sequence-to-sequence model is constructed, comprising an encoder and decoder. |
|
- Training data is fed into the model, and parameters are optimized using backpropagation and gradient descent algorithms. |
|
|
|
### 3.3. Model Evaluation |
|
- The trained model is evaluated on the test set to measure its accuracy. |
|
- Metrics such as BLEU score has been used to quantify the quality of translations. |
|
|
|
### 3.4. Deployment |
|
- Gradio is utilized for deploying the trained model. |
|
- Users can input a French text, and the model will translate it to English. |
|
|
|
```bash |
|
# clone project |
|
git clone https://huggingface.co/spaces/KameliaZaman/French-to-English-Translation/tree/main |
|
|
|
# go inside the project directory |
|
cd French-to-English-Translation |
|
|
|
# install the required packages |
|
pip install -r requirements.txt |
|
|
|
# run the gradio app |
|
python app.py |
|
``` |
|
|
|
## 4. License |
|
This project is licensed under the [MIT License](LICENSE). |
|
|
|
## 5. Contributors |
|
- Kamelia Zaman Moon - kamelia.stu2017@juniv.edu |