File size: 2,911 Bytes
c04c317
 
61b539f
 
 
 
 
 
c17bab2
c04c317
61b539f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
---
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