Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
# Icendanic: NLP Assignment Analysis
|
| 3 |
+
|
| 4 |
+
This repository contains materials and analysis for an NLP assignment focused on translation tasks using LSTM-based and Seq-to-Seq models. The work involves exploring dataset formats, building model architectures, and evaluating model performance using BLEU and ChrF metrics.
|
| 5 |
+
|
| 6 |
+
## Repository Structure
|
| 7 |
+
|
| 8 |
+
### 1. Images
|
| 9 |
+
- **Dataset Format Visualization** (`A2 #Q1 Dataset format.png`):
|
| 10 |
+
- An image showcasing the structure of the dataset used for training both models, including input and output formats.
|
| 11 |
+
- **LSTM Model Class Diagram** (`A2 #Q2 LSTM Model Class.png`):
|
| 12 |
+
- A visual representation of the LSTM model architecture, detailing the layers and the sequence flow.
|
| 13 |
+
- **Seq-to-Seq Model Class Diagram** (`A2 #Q3 Seq-to-Seq Model class.png`):
|
| 14 |
+
- A diagram illustrating the Seq-to-Seq model, including encoder-decoder components and attention mechanisms.
|
| 15 |
+
- **BLEU Score Comparison Plot** (`A2 #Q5 BLEU Scores for both LSTM-based model vs Seq-to-seq model (Plot).png`):
|
| 16 |
+
- A plot comparing BLEU scores obtained from the LSTM and Seq-to-Seq models across different test samples.
|
| 17 |
+
- **ChrF Score Comparison Plot** (`A2 #Q8 Chrf Scores for both LSTM-based model vs Seq-to-seq model .png`):
|
| 18 |
+
- A graphical comparison of ChrF scores between the two models, indicating performance differences.
|
| 19 |
+
|
| 20 |
+
### 2. Documents
|
| 21 |
+
- **Training Curves Document** (`A2 #Q4 Training curves.docx`):
|
| 22 |
+
- A Word document that provides detailed training curves for both models, showcasing loss reduction and accuracy improvements over epochs.
|
| 23 |
+
|
| 24 |
+
### 3. CSV Files
|
| 25 |
+
- **BLEU Scores Data** (`A2 #Q6 BLEU Scores CSV file.csv`):
|
| 26 |
+
- This CSV file contains BLEU scores for various experiments, including different model configurations and datasets.
|
| 27 |
+
- **ChrF Scores Data** (`A2 #Q7 Chrf Scores CSV.csv`):
|
| 28 |
+
- Contains the ChrF scores, which provide an alternative metric to evaluate translation quality, highlighting differences in n-gram overlap.
|
| 29 |
+
|
| 30 |
+
### 4. Jupyter Notebooks
|
| 31 |
+
- **Seq-to-Seq Model Analysis Notebook** (`A2_Q10_Google_Colab_Seq2seq_based_translator_Analysis.ipynb`):
|
| 32 |
+
- An in-depth analysis of the Seq-to-Seq-based translator, including data preprocessing, model training, and evaluation using Google Colab.
|
| 33 |
+
- Features include hyperparameter tuning, use of attention mechanisms, and qualitative analysis of translations.
|
| 34 |
+
- **LSTM-based Model Analysis Notebook** (`A2_Q9_Google_Colab_for_LSTM_based_translator.ipynb`):
|
| 35 |
+
- This notebook covers the implementation and analysis of the LSTM-based translator, providing insights into its training process, evaluation metrics, and sample outputs.
|
| 36 |
+
|
| 37 |
+
### 5. Additional Resources
|
| 38 |
+
- **Colab Links** (`Colab Links.txt`):
|
| 39 |
+
- A text file with direct links to the Google Colab notebooks for easy access and execution.
|
| 40 |
+
|
| 41 |
+
## Getting Started
|
| 42 |
+
|
| 43 |
+
### Prerequisites
|
| 44 |
+
To run the Jupyter notebooks, you will need:
|
| 45 |
+
- Python 3.x
|
| 46 |
+
- Required libraries: `torch`, `transformers`, `matplotlib`, `pandas`, `numpy`
|
| 47 |
+
- Google Colab or a local Jupyter environment
|
| 48 |
+
|
| 49 |
+
### Running the Notebooks
|
| 50 |
+
1. Open the provided links in `Colab Links.txt` or download the `.ipynb` files and upload them to [Google Colab](https://colab.research.google.com/).
|
| 51 |
+
2. Ensure you have access to the dataset files used in the notebooks (if applicable).
|
| 52 |
+
3. Execute the cells step-by-step, following the instructions provided in each notebook.
|
| 53 |
+
|
| 54 |
+
## Evaluation Metrics
|
| 55 |
+
- **BLEU Score**: Measures the n-gram precision between the generated and reference translations.
|
| 56 |
+
- **ChrF Score**: A character n-gram F-score that provides an alternative evaluation metric, especially useful for low-resource languages.
|
| 57 |
+
|
| 58 |
+
## Use Cases
|
| 59 |
+
This project can serve as a reference for:
|
| 60 |
+
- Understanding LSTM and Seq-to-Seq architectures for translation tasks.
|
| 61 |
+
- Evaluating model performance using various metrics.
|
| 62 |
+
- Experimenting with neural network models in NLP tasks using Google Colab.
|
| 63 |
+
|
| 64 |
+
## License
|
| 65 |
+
This project is licensed for educational and research purposes only. For any commercial use, please contact the author.
|
| 66 |
+
|
| 67 |
+
## Contact
|
| 68 |
+
For any questions or feedback, please reach out via the repository's discussion section or the author's email.
|
| 69 |
+
|