Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
library_name: transformers
|
4 |
+
---
|
5 |
+
|
6 |
+
# Swahili-English Translation Model
|
7 |
+
|
8 |
+
## Model Details
|
9 |
+
|
10 |
+
- **Pre-trained Model**: Helsinki-NLP/opus-mt-en-sw
|
11 |
+
- **Architecture**: Transformer
|
12 |
+
- **Training Data**: Fine-tuned on 1,710,223 English-Swahili sentence pairs
|
13 |
+
- **Base Model**: Helsinki-NLP/opus-mt-en-sw
|
14 |
+
- **Training Method**: Fine-tuned with an emphasis on bidirectional translation between Swahili and English.
|
15 |
+
|
16 |
+
### Model Description
|
17 |
+
|
18 |
+
This Swahili-English translation model was developed to handle translations between Swahili, one of Africa's most spoken languages, and English. It was fine-tuned on a large dataset of English-Swahili sentence pairs, leveraging the Transformer architecture for effective translation.
|
19 |
+
|
20 |
+
- **Developed by:** Otieno Bildad Moses
|
21 |
+
- **Model Type:** Transformer
|
22 |
+
- **Languages:** Swahili, English
|
23 |
+
- **License:** Distributed under the MIT License
|
24 |
+
|
25 |
+
### Training Data
|
26 |
+
|
27 |
+
The model was fine-tuned on the following dataset:
|
28 |
+
|
29 |
+
- **OPUS-HPLT:**
|
30 |
+
- **Package**: [en-sw.txt.zip](https://object.pouta.csc.fi/OPUS-HPLT/v1.1/moses/en-sw.txt.zip)
|
31 |
+
- **License**: [CC-BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/legalcode)
|
32 |
+
- **Citation**: Holger Schwenk et al., WikiMatrix: Mining 135M Parallel Sentences in 1620 Language Pairs from Wikipedia, arXiv, July 2019.
|
33 |
+
|
34 |
+
## Usage
|
35 |
+
|
36 |
+
### Using a Pipeline as a High-Level Helper
|
37 |
+
|
38 |
+
```python
|
39 |
+
from transformers import pipeline
|
40 |
+
|
41 |
+
# Initialize the translation pipeline
|
42 |
+
translator = pipeline("translation", model="Bildad/English-Swahili_Translation")
|
43 |
+
|
44 |
+
# Translate text
|
45 |
+
translation = translator("Habari yako?")[0]
|
46 |
+
translated_text = translation["translation_text"]
|
47 |
+
|
48 |
+
print(translated_text)
|