This repository contains my models that has been trained to translate from kikuyu to kiswahili. It also contains the dataset used for the training purposes and the opnnmt tool used fro ddep learning
Table of Contents
=================
* Full Documentation
* Requirements
* Features
* Quickstart
* Citation
## Requirements
All dependencies can be installed via:
```bash
pip install -r requirements.txt
```
Note that we currently only support PyTorch 0.4.
## Features
The following OpenNMT features are implemented:
- data preprocessing
- Inference (translation) with batching and beam search
- Multiple source and target RNN (lstm/gru) types and attention (dotprod/mlp) types
- TensorBoard/Crayon logging
- Source word features
- Pretrained Embeddings
- Copy and Coverage Attention
- Image-to-text processing
- Speech-to-text processing
- "Attention is all you need"
- Inference time loss functions.
Beta Features (committed):
- multi-GPU
- Structured attention
- [Conv2Conv convolution model]
- SRU "RNNs faster than CNN" paper
## Quickstart
Full Documentation
### Step 1: Preprocess the data
```bash
python preprocess.py -train_src data/src-train.txt -train_tgt data/tgt-train.txt -valid_src data/src-val.txt -valid_tgt data/tgt-val.txt -save_data data/demo
```
We will be working with some example data in `data/` folder.
The data consists of parallel source (`src`) and target (`tgt`) data containing one sentence per line with tokens separated by a space:
* `src-train.txt`
* `tgt-train.txt`
* `src-val.txt`
* `tgt-val.txt`
Validation files are required and used to evaluate the convergence of the training. It usually contains no more than 5000 sentences.
After running the preprocessing, the following files are generated:
* `demo.train.pt`: serialized PyTorch file containing training data
* `demo.valid.pt`: serialized PyTorch file containing validation data
* `demo.vocab.pt`: serialized PyTorch file containing vocabulary data
Internally the system never touches the words themselves, but uses these indices.
### Step 2: Train the model
```bash
python train.py -data data/demo -save_model demo-model
```
The main train command is quite simple. Minimally it takes a …