mahrnoud commited on
Commit
065f052
·
1 Parent(s): 058f561

First Commit

Browse files
Files changed (5) hide show
  1. .DS_Store +0 -0
  2. README.md +47 -3
  3. special_tokens_map.json +20 -0
  4. tokenizer.json +0 -0
  5. tokenizer_config.json +153 -0
.DS_Store ADDED
Binary file (6.15 kB). View file
 
README.md CHANGED
@@ -1,3 +1,47 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - ar
4
+ - en
5
+
6
+ dataset:
7
+ - fka/awesome-chatgpt-prompts
8
+ - open-r1/codeforces
9
+
10
+
11
+ license: mit
12
+ ---
13
+
14
+ ## Miscovery Tokenizer
15
+
16
+ A SentencePiece unigram tokenizer trained on a mix of Arabic and English text, with a vocabulary size of 100,000 tokens.
17
+
18
+ ## Training Data
19
+ This tokenizer was trained on:
20
+ - Arabic Quran.
21
+ - awesome-chatgpt-prompts
22
+ - open-r1/codeforces
23
+
24
+ ## Usage
25
+
26
+ ```python
27
+ from transformers import AutoTokenizer
28
+
29
+ tokenizer = AutoTokenizer.from_pretrained("miscovery/arabic-english-tokenizer")
30
+
31
+ # Example usage
32
+ text = "بسم الله الرحمن الرحيم Hello World"
33
+ encoded = tokenizer(text)
34
+ print(encoded)
35
+ ```
36
+
37
+ ## Features
38
+
39
+ - Vocabulary size: 100,000
40
+ - Model type: Unigram
41
+ - Model Max Length: 512
42
+ - Handles both Arabic and English text
43
+ - Supports Arabic normalization
44
+
45
+
46
+
47
+
special_tokens_map.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "[LANG_EN]",
4
+ "[LANG_AR]",
5
+ "[LANG_AR_EG]",
6
+ "[TRANSLATION]",
7
+ "[SUMMARIZATION]",
8
+ "[PARAPHRASING]",
9
+ "[INSTRUCTIONS]",
10
+ "[CHOICES]",
11
+ "[REASONING]",
12
+ "[QUESTION_ANSWER]",
13
+ "[CALCULATE]"
14
+ ],
15
+ "cls_token": "[CLS]",
16
+ "mask_token": "[MASK]",
17
+ "pad_token": "[PAD]",
18
+ "sep_token": "[SEP]",
19
+ "unk_token": "[UNK]"
20
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,153 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "[PAD]",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "[UNK]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "[CLS]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "3": {
28
+ "content": "[SEP]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "4": {
36
+ "content": "[MASK]",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ },
43
+ "5": {
44
+ "content": "[LANG_EN]",
45
+ "lstrip": false,
46
+ "normalized": false,
47
+ "rstrip": false,
48
+ "single_word": false,
49
+ "special": true
50
+ },
51
+ "6": {
52
+ "content": "[LANG_AR]",
53
+ "lstrip": false,
54
+ "normalized": false,
55
+ "rstrip": false,
56
+ "single_word": false,
57
+ "special": true
58
+ },
59
+ "7": {
60
+ "content": "[LANG_AR_EG]",
61
+ "lstrip": false,
62
+ "normalized": false,
63
+ "rstrip": false,
64
+ "single_word": false,
65
+ "special": true
66
+ },
67
+ "8": {
68
+ "content": "[TRANSLATION]",
69
+ "lstrip": false,
70
+ "normalized": false,
71
+ "rstrip": false,
72
+ "single_word": false,
73
+ "special": true
74
+ },
75
+ "9": {
76
+ "content": "[SUMMARIZATION]",
77
+ "lstrip": false,
78
+ "normalized": false,
79
+ "rstrip": false,
80
+ "single_word": false,
81
+ "special": true
82
+ },
83
+ "10": {
84
+ "content": "[PARAPHRASING]",
85
+ "lstrip": false,
86
+ "normalized": false,
87
+ "rstrip": false,
88
+ "single_word": false,
89
+ "special": true
90
+ },
91
+ "11": {
92
+ "content": "[INSTRUCTIONS]",
93
+ "lstrip": false,
94
+ "normalized": false,
95
+ "rstrip": false,
96
+ "single_word": false,
97
+ "special": true
98
+ },
99
+ "12": {
100
+ "content": "[CHOICES]",
101
+ "lstrip": false,
102
+ "normalized": false,
103
+ "rstrip": false,
104
+ "single_word": false,
105
+ "special": true
106
+ },
107
+ "13": {
108
+ "content": "[REASONING]",
109
+ "lstrip": false,
110
+ "normalized": false,
111
+ "rstrip": false,
112
+ "single_word": false,
113
+ "special": true
114
+ },
115
+ "14": {
116
+ "content": "[QUESTION_ANSWER]",
117
+ "lstrip": false,
118
+ "normalized": false,
119
+ "rstrip": false,
120
+ "single_word": false,
121
+ "special": true
122
+ },
123
+ "15": {
124
+ "content": "[CALCULATE]",
125
+ "lstrip": false,
126
+ "normalized": false,
127
+ "rstrip": false,
128
+ "single_word": false,
129
+ "special": true
130
+ }
131
+ },
132
+ "additional_special_tokens": [
133
+ "[LANG_EN]",
134
+ "[LANG_AR]",
135
+ "[LANG_AR_EG]",
136
+ "[TRANSLATION]",
137
+ "[SUMMARIZATION]",
138
+ "[PARAPHRASING]",
139
+ "[INSTRUCTIONS]",
140
+ "[CHOICES]",
141
+ "[REASONING]",
142
+ "[QUESTION_ANSWER]",
143
+ "[CALCULATE]"
144
+ ],
145
+ "clean_up_tokenization_spaces": true,
146
+ "cls_token": "[CLS]",
147
+ "mask_token": "[MASK]",
148
+ "model_max_length": 1000000000000000019884624838656,
149
+ "pad_token": "[PAD]",
150
+ "sep_token": "[SEP]",
151
+ "tokenizer_class": "PreTrainedTokenizerFast",
152
+ "unk_token": "[UNK]"
153
+ }