-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sepedi to English #194
Open
Matsobane-no
wants to merge
13
commits into
masakhane-io:master
Choose a base branch
from
Matsobane-no:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Sepedi to English #194
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
41c65f8
Add files via upload
Matsobane-no 8fed375
Delete starter_notebook_reverse_training.ipynb
Matsobane-no f70f465
Created using Colaboratory
Matsobane-no 7df9671
Delete starter_notebook_into_English_training-checkpoint.ipynb
Matsobane-no 3cd9c03
Sepedi to English
Matsobane-no c164bdf
Delete readme.md
Matsobane-no 2ad4b5d
Delete results.txt
Matsobane-no 5f517f1
Delete bpe.codes.4000
Matsobane-no 1182af6
Delete test.nso
Matsobane-no 6dc9f7a
Delete ennso.ipynb
Matsobane-no a56b338
Delete test.en
Matsobane-no fab42f7
Sepedi to English
Matsobane-no 1877b40
Merge branch 'master' of https://github.com/Matsobane-no/masakhane-mt
Matsobane-no File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
1,306 changes: 0 additions & 1,306 deletions
1,306
.ipynb_checkpoints/starter_notebook_into_English_training-checkpoint.ipynb
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Sepedi to Engish | ||
|
||
Author: Matsobane Neo | ||
|
||
## Data | ||
|
||
- The JW300 Sepedi- English. | ||
|
||
## Model | ||
|
||
- Default Masakhane Transformer translation model. | ||
- Link to google drive folder with model(https://drive.google.com/drive/folders/1-Evp0Srf3U9LaRihNg6Rm5qM81Lq9JoT?usp=sharing) | ||
|
||
## Analysis | ||
|
||
Example 1 | ||
```sh | ||
Source:Ge ma - Mexico a setlogo a belegetšwego moo a be a sa amogele bodumedi bjo bofsa , a be a tšewa e le barapedi ba diswantšho gomme a tlaišwa o šoro . | ||
Reference: If native-born Mexicans did not embrace the new religion , they were regarded as idolaters and were severely persecuted . | ||
Hypothesis: When Mexico was born where he had no new religion , he was taken as a pictures and suffered severe persecution . | ||
``` | ||
|
||
Example 2 | ||
```sh | ||
Source: Moprofesara Rudolf Schenkel , mophologi wa tlhaselo ya tšhukudu yo go boletšwego ka yena pejana o lla ka therešo ya gore motho o itirile lenaba le nnoši leo tšhukudu e nago le lona . | ||
Reference: Professor Rudolf Schenkel , the survivor of the rhino charge described earlier , laments the fact that man has made himself the only enemy the rhino has . | ||
Hypothesis: Professor Rudolf Schenkel , a humble relief mentioned earlier , repeating the truth that a person is a very very river . | ||
``` | ||
|
||
Example 3 | ||
```sh | ||
Source: Go sa šetšwe gore o na le bana ba bakae , o se ke wa langwa go ba thušeng tseleng e išago bophelong bjo bo sa felego . | ||
Reference: No matter how many children you have , never give up in helping them along the path to everlasting life . | ||
Hypothesis:Whether you have a few children , you don ’ t have to help them in a way to everlasting life . | ||
``` | ||
|
||
|
||
# Results | ||
- BLEU dev : 28.62 | ||
- BLEU test : 34.67 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
|
||
name: "nsoen_reverse_transformer" | ||
|
||
data: | ||
src: "nso" | ||
trg: "en" | ||
train: "data/nsoen/train.bpe" | ||
dev: "data/nsoen/dev.bpe" | ||
test: "data/nsoen/test.bpe" | ||
level: "bpe" | ||
lowercase: False | ||
max_sent_length: 100 | ||
src_vocab: "data/nsoen/vocab.txt" | ||
trg_vocab: "data/nsoen/vocab.txt" | ||
|
||
testing: | ||
beam_size: 5 | ||
alpha: 1.0 | ||
|
||
training: | ||
#load_model: "/content/drive/My Drive/masakhane/nso-en-baseline/models/nsoen_transformer/1.ckpt" # if uncommented, load a pre-trained model from this checkpoint | ||
random_seed: 42 | ||
optimizer: "adam" | ||
normalization: "tokens" | ||
adam_betas: [0.9, 0.999] | ||
scheduling: "plateau" # TODO: try switching from plateau to Noam scheduling | ||
patience: 5 # For plateau: decrease learning rate by decrease_factor if validation score has not improved for this many validation rounds. | ||
learning_rate_factor: 0.5 # factor for Noam scheduler (used with Transformer) | ||
learning_rate_warmup: 1000 # warmup steps for Noam scheduler (used with Transformer) | ||
decrease_factor: 0.7 | ||
loss: "crossentropy" | ||
learning_rate: 0.0003 | ||
learning_rate_min: 0.00000001 | ||
weight_decay: 0.0 | ||
label_smoothing: 0.1 | ||
batch_size: 4096 | ||
batch_type: "token" | ||
eval_batch_size: 3600 | ||
eval_batch_type: "token" | ||
batch_multiplier: 1 | ||
early_stopping_metric: "ppl" | ||
epochs: 2 # TODO: Decrease for when playing around and checking of working. Around 30 is sufficient to check if its working at all | ||
validation_freq: 1000 # TODO: Set to at least once per epoch. | ||
logging_freq: 100 | ||
eval_metric: "bleu" | ||
model_dir: "models/nsoen_reverse_transformer" | ||
overwrite: True # TODO: Set to True if you want to overwrite possibly existing models. | ||
shuffle: True | ||
use_cuda: True | ||
max_output_length: 100 | ||
print_valid_sents: [0, 1, 2, 3] | ||
keep_last_ckpts: 3 | ||
|
||
model: | ||
initializer: "xavier" | ||
bias_initializer: "zeros" | ||
init_gain: 1.0 | ||
embed_initializer: "xavier" | ||
embed_init_gain: 1.0 | ||
tied_embeddings: True | ||
tied_softmax: True | ||
encoder: | ||
type: "transformer" | ||
num_layers: 6 | ||
num_heads: 4 # TODO: Increase to 8 for larger data. | ||
embeddings: | ||
embedding_dim: 256 # TODO: Increase to 512 for larger data. | ||
scale: True | ||
dropout: 0.2 | ||
# typically ff_size = 4 x hidden_size | ||
hidden_size: 256 # TODO: Increase to 512 for larger data. | ||
ff_size: 1024 # TODO: Increase to 2048 for larger data. | ||
dropout: 0.3 | ||
decoder: | ||
type: "transformer" | ||
num_layers: 6 | ||
num_heads: 4 # TODO: Increase to 8 for larger data. | ||
embeddings: | ||
embedding_dim: 256 # TODO: Increase to 512 for larger data. | ||
scale: True | ||
dropout: 0.2 | ||
# typically ff_size = 4 x hidden_size | ||
hidden_size: 256 # TODO: Increase to 512 for larger data. | ||
ff_size: 1024 # TODO: Increase to 2048 for larger data. | ||
dropout: 0.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
2021-10-14 18:06:07,082 - INFO - root - Hello! This is Joey-NMT (version 1.3). | ||
2021-10-14 18:07:39,312 - INFO - joeynmt.prediction - dev bleu[13a]: 28.62 [Beam search decoding with beam size = 5 and alpha = 1.0] | ||
2021-10-14 18:09:46,494 - INFO - joeynmt.prediction - test bleu[13a]: 34.67 [Beam search decoding with beam size = 5 and alpha = 1.0] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make it accessible to everyone :)