File size: 1,506 Bytes
dcb81ce
f3e9e5d
 
 
dcb81ce
f3e9e5d
 
 
 
 
 
dcb81ce
f3e9e5d
09e84ad
f3e9e5d
 
 
 
09e84ad
 
f3e9e5d
 
 
 
 
 
 
 
 
 
 
09e84ad
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
---
language:
- ur
- en
license: apache-2.0
datasets:
- iwslt14
metrics:
- bleu
library_name: fairseq
pipeline_tag: translation
---

### Urdu to English Translation
Urdu to English translation model is a Transformer model trained on IWSLT back-translated data using Faireq. 
This model is produced during the experimentation related to building Context-Aware NMT models for low-resourced languages such as Urdu, Hindi, Sindhi, Pashtu and Punjabi. This particular model does not contains any contextual information and it is baseline sentence-level transformer model.
The evaluation is done on WMT2017 standard test set. 

* source group: English 
* target group: Urdu 

* model: transformer
* Contextual 
* Test Set: WMT2017
* pre-processing: Moses + Indic Tokenizer
* Dataset + Libray Details:  [DLNMT](https://github.com/sami-haq99/nrpu-dlnmt)

## Benchmarks

| testset               | BLEU  |
|-----------------------|-------|
| Wmt2017  	| 50.03 	|

## How to use model?
* This model can be accessed via git clone:
  ```
  git clone https://huggingface.co/samiulhaq/iwslt-bt-en-ur
  ```
* You can use Fairseq library to access the model for translations:
  ```
  from fairseq.models.transformer import TransformerModel
  ```

### Load the model
```
model = TransformerModel.from_pretrained('path/to/model')

```

#### Set the model to evaluation mode
```
model.eval()
```

#### Perform inference
```
input_text = 'Hello, how are you?'

output_text = model.translate(input_text)

print(output_text)
```