KoichiYasuoka
commited on
Commit
•
c5aae34
1
Parent(s):
e3b42c3
initial release
Browse files- README.md +41 -3
- config.json +223 -0
- pytorch_model.bin +3 -0
- special_tokens_map.json +1 -0
- supar.model +3 -0
- tokenizer.json +0 -0
- tokenizer_config.json +1 -0
- vocab.txt +0 -0
README.md
CHANGED
@@ -1,3 +1,41 @@
|
|
1 |
-
---
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- "uk"
|
4 |
+
tags:
|
5 |
+
- "ukrainian"
|
6 |
+
- "token-classification"
|
7 |
+
- "pos"
|
8 |
+
- "ubertext"
|
9 |
+
- "dependency-parsing"
|
10 |
+
datasets:
|
11 |
+
- "universal_dependencies"
|
12 |
+
license: "cc-by-sa-4.0"
|
13 |
+
pipeline_tag: "token-classification"
|
14 |
+
---
|
15 |
+
|
16 |
+
# roberta-base-ukrainian-upos
|
17 |
+
|
18 |
+
## Model Description
|
19 |
+
|
20 |
+
This is a RoBERTa model pre-trained on Thai Wikipedia texts for POS-tagging and dependency-parsing, derived from [roberta-base-ukrainian](https://huggingface.co/KoichiYasuoka/roberta-base-ukrainian). Every word is tagged by [UPOS](https://universaldependencies.org/u/pos/) (Universal Part-Of-Speech).
|
21 |
+
|
22 |
+
## How to Use
|
23 |
+
|
24 |
+
```py
|
25 |
+
import torch
|
26 |
+
from transformers import AutoTokenizer,AutoModelForTokenClassification
|
27 |
+
tokenizer=AutoTokenizer.from_pretrained("KoichiYasuoka/roberta-base-ukrainian-upos")
|
28 |
+
model=AutoModelForTokenClassification.from_pretrained("KoichiYasuoka/roberta-base-ukrainian-upos")
|
29 |
+
```
|
30 |
+
|
31 |
+
or
|
32 |
+
|
33 |
+
```
|
34 |
+
import esupar
|
35 |
+
nlp=esupar.load("KoichiYasuoka/roberta-base-ukrainian-upos")
|
36 |
+
```
|
37 |
+
|
38 |
+
## See Also
|
39 |
+
|
40 |
+
[esupar](https://github.com/KoichiYasuoka/esupar): Tokenizer POS-tagger and Dependency-parser with BERT/RoBERTa models
|
41 |
+
|
config.json
ADDED
@@ -0,0 +1,223 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"architectures": [
|
3 |
+
"RobertaForTokenClassification"
|
4 |
+
],
|
5 |
+
"attention_probs_dropout_prob": 0.1,
|
6 |
+
"bos_token_id": 0,
|
7 |
+
"classifier_dropout": null,
|
8 |
+
"eos_token_id": 2,
|
9 |
+
"hidden_act": "gelu",
|
10 |
+
"hidden_dropout_prob": 0.1,
|
11 |
+
"hidden_size": 768,
|
12 |
+
"id2label": {
|
13 |
+
"0": "ADJ",
|
14 |
+
"1": "ADP",
|
15 |
+
"2": "ADV",
|
16 |
+
"3": "AUX",
|
17 |
+
"4": "B-ADJ",
|
18 |
+
"5": "B-ADP",
|
19 |
+
"6": "B-ADV",
|
20 |
+
"7": "B-AUX",
|
21 |
+
"8": "B-CCONJ",
|
22 |
+
"9": "B-DET",
|
23 |
+
"10": "B-INTJ",
|
24 |
+
"11": "B-NOUN",
|
25 |
+
"12": "B-NOUN+NUM",
|
26 |
+
"13": "B-NUM",
|
27 |
+
"14": "B-NUM+NOUN",
|
28 |
+
"15": "B-PART",
|
29 |
+
"16": "B-PRON",
|
30 |
+
"17": "B-PROPN",
|
31 |
+
"18": "B-PUNCT",
|
32 |
+
"19": "B-SCONJ",
|
33 |
+
"20": "B-SYM",
|
34 |
+
"21": "B-VERB",
|
35 |
+
"22": "B-VERB+ADV",
|
36 |
+
"23": "B-VERB+PRON",
|
37 |
+
"24": "B-X",
|
38 |
+
"25": "CCONJ",
|
39 |
+
"26": "DET",
|
40 |
+
"27": "I-ADJ",
|
41 |
+
"28": "I-ADP",
|
42 |
+
"29": "I-ADV",
|
43 |
+
"30": "I-AUX",
|
44 |
+
"31": "I-CCONJ",
|
45 |
+
"32": "I-DET",
|
46 |
+
"33": "I-INTJ",
|
47 |
+
"34": "I-NOUN",
|
48 |
+
"35": "I-NOUN+NUM",
|
49 |
+
"36": "I-NUM",
|
50 |
+
"37": "I-NUM+NOUN",
|
51 |
+
"38": "I-PART",
|
52 |
+
"39": "I-PRON",
|
53 |
+
"40": "I-PROPN",
|
54 |
+
"41": "I-PUNCT",
|
55 |
+
"42": "I-SCONJ",
|
56 |
+
"43": "I-SYM",
|
57 |
+
"44": "I-VERB",
|
58 |
+
"45": "I-VERB+ADV",
|
59 |
+
"46": "I-VERB+PRON",
|
60 |
+
"47": "I-X",
|
61 |
+
"48": "INTJ",
|
62 |
+
"49": "NOUN",
|
63 |
+
"50": "NOUN+NUM",
|
64 |
+
"51": "NUM",
|
65 |
+
"52": "NUM+NOUN",
|
66 |
+
"53": "PART",
|
67 |
+
"54": "PRON",
|
68 |
+
"55": "PROPN",
|
69 |
+
"56": "PUNCT",
|
70 |
+
"57": "SCONJ",
|
71 |
+
"58": "SYM",
|
72 |
+
"59": "VERB",
|
73 |
+
"60": "VERB+ADV",
|
74 |
+
"61": "VERB+PRON",
|
75 |
+
"62": "X"
|
76 |
+
},
|
77 |
+
"initializer_range": 0.02,
|
78 |
+
"intermediate_size": 3072,
|
79 |
+
"label2id": {
|
80 |
+
"ADJ": 0,
|
81 |
+
"ADP": 1,
|
82 |
+
"ADV": 2,
|
83 |
+
"AUX": 3,
|
84 |
+
"B-ADJ": 4,
|
85 |
+
"B-ADP": 5,
|
86 |
+
"B-ADV": 6,
|
87 |
+
"B-AUX": 7,
|
88 |
+
"B-CCONJ": 8,
|
89 |
+
"B-DET": 9,
|
90 |
+
"B-INTJ": 10,
|
91 |
+
"B-NOUN": 11,
|
92 |
+
"B-NOUN+NUM": 12,
|
93 |
+
"B-NUM": 13,
|
94 |
+
"B-NUM+NOUN": 14,
|
95 |
+
"B-PART": 15,
|
96 |
+
"B-PRON": 16,
|
97 |
+
"B-PROPN": 17,
|
98 |
+
"B-PUNCT": 18,
|
99 |
+
"B-SCONJ": 19,
|
100 |
+
"B-SYM": 20,
|
101 |
+
"B-VERB": 21,
|
102 |
+
"B-VERB+ADV": 22,
|
103 |
+
"B-VERB+PRON": 23,
|
104 |
+
"B-X": 24,
|
105 |
+
"CCONJ": 25,
|
106 |
+
"DET": 26,
|
107 |
+
"I-ADJ": 27,
|
108 |
+
"I-ADP": 28,
|
109 |
+
"I-ADV": 29,
|
110 |
+
"I-AUX": 30,
|
111 |
+
"I-CCONJ": 31,
|
112 |
+
"I-DET": 32,
|
113 |
+
"I-INTJ": 33,
|
114 |
+
"I-NOUN": 34,
|
115 |
+
"I-NOUN+NUM": 35,
|
116 |
+
"I-NUM": 36,
|
117 |
+
"I-NUM+NOUN": 37,
|
118 |
+
"I-PART": 38,
|
119 |
+
"I-PRON": 39,
|
120 |
+
"I-PROPN": 40,
|
121 |
+
"I-PUNCT": 41,
|
122 |
+
"I-SCONJ": 42,
|
123 |
+
"I-SYM": 43,
|
124 |
+
"I-VERB": 44,
|
125 |
+
"I-VERB+ADV": 45,
|
126 |
+
"I-VERB+PRON": 46,
|
127 |
+
"I-X": 47,
|
128 |
+
"INTJ": 48,
|
129 |
+
"NOUN": 49,
|
130 |
+
"NOUN+NUM": 50,
|
131 |
+
"NUM": 51,
|
132 |
+
"NUM+NOUN": 52,
|
133 |
+
"PART": 53,
|
134 |
+
"PRON": 54,
|
135 |
+
"PROPN": 55,
|
136 |
+
"PUNCT": 56,
|
137 |
+
"SCONJ": 57,
|
138 |
+
"SYM": 58,
|
139 |
+
"VERB": 59,
|
140 |
+
"VERB+ADV": 60,
|
141 |
+
"VERB+PRON": 61,
|
142 |
+
"X": 62
|
143 |
+
},
|
144 |
+
"layer_norm_eps": 1e-12,
|
145 |
+
"max_position_embeddings": 512,
|
146 |
+
"model_type": "roberta",
|
147 |
+
"num_attention_heads": 12,
|
148 |
+
"num_hidden_layers": 12,
|
149 |
+
"pad_token_id": 1,
|
150 |
+
"position_embedding_type": "absolute",
|
151 |
+
"task_specific_params": {
|
152 |
+
"upos_multiword": {
|
153 |
+
"NUM+NOUN": {
|
154 |
+
"\u043f\u0456\u0432'\u044f\u0440\u0434\u0430": [
|
155 |
+
"\u043f\u0456\u0432",
|
156 |
+
"\u044f\u0440\u0434\u0430"
|
157 |
+
],
|
158 |
+
"\u043f\u0456\u0432\u0440\u043e\u043a\u0443": [
|
159 |
+
"\u043f\u0456\u0432",
|
160 |
+
"\u0440\u043e\u043a\u0443"
|
161 |
+
],
|
162 |
+
"\u043f\u0456\u0432\u2019\u044f\u0433\u043d\u044f\u0442\u0438": [
|
163 |
+
"\u043f\u0456\u0432",
|
164 |
+
"\u044f\u0433\u043d\u044f\u0442\u0438"
|
165 |
+
],
|
166 |
+
"\u043f\u0456\u0432\u2019\u044f\u0437\u0438\u043a\u0430": [
|
167 |
+
"\u043f\u0456\u0432",
|
168 |
+
"\u044f\u0437\u0438\u043a\u0430"
|
169 |
+
],
|
170 |
+
"\u043f\u0456\u0432\u2019\u044f\u0449\u0438\u043a\u0430": [
|
171 |
+
"\u043f\u0456\u0432",
|
172 |
+
"\u044f\u0449\u0438\u043a\u0430"
|
173 |
+
]
|
174 |
+
},
|
175 |
+
"VERB+ADV": {
|
176 |
+
"\u043d\u0456\u0434\u0435": [
|
177 |
+
"\u043d\u0435\u043c\u0430\u0454",
|
178 |
+
"\u0434\u0435"
|
179 |
+
],
|
180 |
+
"\u043d\u0456\u0437\u0432\u0456\u0434\u043a\u0438": [
|
181 |
+
"\u043d\u0435\u043c\u0430\u0454",
|
182 |
+
"\u0437\u0432\u0456\u0434\u043a\u0438"
|
183 |
+
],
|
184 |
+
"\u043d\u0456\u043a\u043e\u043b\u0438": [
|
185 |
+
"\u043d\u0435\u043c\u0430\u0454",
|
186 |
+
"\u043a\u043e\u043b\u0438"
|
187 |
+
],
|
188 |
+
"\u043d\u0456\u043a\u0443\u0434\u0438": [
|
189 |
+
"\u043d\u0435\u043c\u0430\u0454",
|
190 |
+
"\u043a\u0443\u0434\u0438"
|
191 |
+
],
|
192 |
+
"\u043d\u0456\u044f\u043a": [
|
193 |
+
"\u043d\u0435\u043c\u0430\u0454",
|
194 |
+
"\u044f\u043a"
|
195 |
+
]
|
196 |
+
},
|
197 |
+
"VERB+PRON": {
|
198 |
+
"\u043d\u0456\u043a\u0438\u043c": [
|
199 |
+
"\u043d\u0435\u043c\u0430\u0454",
|
200 |
+
"\u043a\u0438\u043c"
|
201 |
+
],
|
202 |
+
"\u043d\u0456\u043a\u043e\u0433\u043e": [
|
203 |
+
"\u043d\u0435\u043c\u0430\u0454",
|
204 |
+
"\u043a\u043e\u0433\u043e"
|
205 |
+
],
|
206 |
+
"\u043d\u0456\u043a\u043e\u043c\u0443": [
|
207 |
+
"\u043d\u0435\u043c\u0430\u0454",
|
208 |
+
"\u043a\u043e\u043c\u0443"
|
209 |
+
],
|
210 |
+
"\u043d\u0456\u0447\u0438\u043c": [
|
211 |
+
"\u043d\u0435\u043c\u0430\u0454",
|
212 |
+
"\u0447\u0438\u043c"
|
213 |
+
]
|
214 |
+
}
|
215 |
+
}
|
216 |
+
},
|
217 |
+
"tokenizer_class": "BertTokenizerFast",
|
218 |
+
"torch_dtype": "float32",
|
219 |
+
"transformers_version": "4.14.1",
|
220 |
+
"type_vocab_size": 2,
|
221 |
+
"use_cache": true,
|
222 |
+
"vocab_size": 30000
|
223 |
+
}
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:735ce76697fea88bd807ed7cf843d11a691c2fb81c9637a5f42f9f6848ceb7ac
|
3 |
+
size 434241393
|
special_tokens_map.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]"}
|
supar.model
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:16e19fd58bfb82b801655327a1b4ded01417a453e643091ea6baef06bf5ad6b4
|
3 |
+
size 487153701
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"do_lower_case": true, "unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]", "tokenize_chinese_chars": true, "strip_accents": false, "lowercase": false, "never_split": ["[CLS]", "[PAD]", "[SEP]", "[UNK]", "[MASK]"], "do_basic_tokenize": true, "model_max_length": 512, "tokenizer_class": "BertTokenizerFast"}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|