Logo Lanfrica

Morioh/swahili-translation

Domain:

natural language processing
Creator:
Mor
Host:
Native Language Translation ## Simple English-Swahili Translation Model ### Introduction This project aims to build a simple translation model using a very small dataset of around 10 sentences. The objective is to translate short sentences from English to another language. Given the dataset's limited size, the project focuses on understanding the model's performance, identifying its limitations, and exploring areas for improvement. --- ### Dataset Creation and Preprocessing - **Dataset**: - The dataset contains 10 manually gathered sentence pairs for English-to-target language translation. - Example: - **English**: "I have a headache." - **Translation**: "Kichwa kinauma." - **Preprocessing Steps**: 1. **Tokenization**: Sentences were split into individual words. 2. **Padding**: Applied to ensure all inputs have equal length. 3. **Vocabulary**: A limited vocabulary was created for both source and target languages. 4. **Encoding**: Each word was mapped to an integer for neural network processing. --- ### Model Architecture and Design Choices - **Model Architecture**: - **Encoder**: - Converts input sentences into hidden state representations using LSTM layers. - **Decoder**: - Generates translated sentences using the encoder's hidden state and LSTM layers. - **Embedding Layer**: - Represents words as dense vectors for both the encoder and decoder. - **Attention Mechanism** (Optional): - Not implemented in this iteration but could improve accuracy by focusing on relevant parts of input sentences. --- ### Training Process and Hyperparameters - **Training Details**: - The model was trained for a few epochs with a small learning rate to prevent overfitting. - **Hyperparameters**: - **Optimizer**: Adam optimizer with a learning rate of 0.001. - **Batch Size**: 1 (due to the small dataset). - **Epochs**: 100. - **Loss Function**: Categorical cross-entropy. - **Dropout**: Used in encoder and decoder to prevent overfitting. --- ### Evaluation Metrics and Results - **Metrics**: - **Accura …

Languages