jordimas commited on
Commit
a1b4cdb
·
1 Parent(s): 72b3a7b

Initial version+

Browse files
Files changed (6) hide show
  1. README.md +59 -3
  2. config.json +2 -0
  3. model.bin +3 -0
  4. model_description.txt +9 -0
  5. shared_vocabulary.txt +0 -0
  6. sp_m.model +3 -0
README.md CHANGED
@@ -1,3 +1,59 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - ca
4
+ - nl
5
+
6
+ tags:
7
+ - translation
8
+
9
+ library_name: opennmt
10
+ license: mit
11
+ metrics:
12
+ - bleu
13
+
14
+ inference: false
15
+ ---
16
+
17
+ ### Introduction
18
+
19
+ Dutch - Catalan translation model based on OpenNMT. These are the same models that we have in production at https://www.softcatala.org/traductor/.
20
+
21
+
22
+ ### Usage
23
+
24
+
25
+ ```bash
26
+ pip3 install ctranslate2 pyonmttok
27
+ ```
28
+
29
+ Simple translation using Python:
30
+
31
+
32
+
33
+ ```python
34
+ import ctranslate2
35
+ import pyonmttok
36
+ from huggingface_hub import snapshot_download
37
+ model_dir = snapshot_download(repo_id="softcatala/translate-fra-cat", revision="main")
38
+
39
+ tokenizer=pyonmttok.Tokenizer(mode="none", sp_model_path = model_dir + "/sp_m.model")
40
+ tokenized=tokenizer.tokenize("Salut monde")
41
+
42
+ import ctranslate2
43
+ translator = ctranslate2.Translator(model_dir)
44
+ translated = translator.translate_batch([tokenized[0]])
45
+ print(tokenizer.detokenize(translated[0][0]['tokens']))
46
+ Hola món!
47
+ ```
48
+
49
+ ## Benchmarks
50
+
51
+ | testset | BLEU |
52
+ |---------------------------------------|-------|
53
+ | test dataset (from train/dev/test) | 27.6 |
54
+ | Flores200 dataset | 18.2 |
55
+
56
+ ## Additional information
57
+ * https://github.com/Softcatala/nmt-models
58
+ * https://github.com/Softcatala/parallel-catalan-corpus
59
+
config.json ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ {
2
+ }
model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f9ea6864ecc5d8751fab0efe132b8d2b02a6272d569f429b3d3bce3204795793
3
+ size 70727761
model_description.txt ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ Model description: cat-nld
2
+ Date: 2022-11-19
3
+ TF version 2.10.0, OpenNMT version 2.29.1, CTranslate2 version 2.24.0
4
+ Test data set
5
+ BLEU|nrefs:1|case:mixed|eff:no|tok:13a|smooth:exp|version:2.1.0 = 27.6 59.2/33.4/22.0/14.9 (BP = 0.971 ratio = 0.972 hyp_len = 143209 ref_len = 147368)
6
+ chrF2|nrefs:1|case:mixed|eff:yes|nc:6|nw:0|space:no|version:2.1.0 = 56.0
7
+ Flores data set
8
+ BLEU|nrefs:1|case:mixed|eff:no|tok:13a|smooth:exp|version:2.1.0 = 18.2 52.6/23.7/12.7/7.2 (BP = 0.992 ratio = 0.992 hyp_len = 25258 ref_len = 25467)
9
+ chrF2|nrefs:1|case:mixed|eff:yes|nc:6|nw:0|space:no|version:2.1.0 = 49.5
shared_vocabulary.txt ADDED
The diff for this file is too large to render. See raw diff
 
sp_m.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3bcb6d56f89540284e5f390db77c580fa67ad0d68207e19af05644250a9c752c
3
+ size 1177902