Commit
·
fb195ef
1
Parent(s):
adae486
initial release
Browse files- README.md +39 -3
- config.json +275 -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,39 @@
|
|
1 |
-
---
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- "de"
|
4 |
+
tags:
|
5 |
+
- "german"
|
6 |
+
- "token-classification"
|
7 |
+
- "pos"
|
8 |
+
- "dependency-parsing"
|
9 |
+
datasets:
|
10 |
+
- "universal_dependencies"
|
11 |
+
license: "mit"
|
12 |
+
pipeline_tag: "token-classification"
|
13 |
+
---
|
14 |
+
|
15 |
+
# bert-large-german-upos
|
16 |
+
|
17 |
+
## Model Description
|
18 |
+
|
19 |
+
This is a BERT model pre-trained with [UD_German-HDT](https://github.com/UniversalDependencies/UD_German-HDT) for POS-tagging and dependency-parsing, derived from [gbert-large](https://huggingface.co/deepset/gbert-large). Every word is tagged by [UPOS](https://universaldependencies.org/u/pos/) (Universal Part-Of-Speech).
|
20 |
+
|
21 |
+
## How to Use
|
22 |
+
|
23 |
+
```py
|
24 |
+
from transformers import AutoTokenizer,AutoModelForTokenClassification
|
25 |
+
tokenizer=AutoTokenizer.from_pretrained("KoichiYasuoka/bert-large-german-upos")
|
26 |
+
model=AutoModelForTokenClassification.from_pretrained("KoichiYasuoka/bert-large-german-upos")
|
27 |
+
```
|
28 |
+
|
29 |
+
or
|
30 |
+
|
31 |
+
```py
|
32 |
+
import esupar
|
33 |
+
nlp=esupar.load("KoichiYasuoka/bert-large-german-upos")
|
34 |
+
```
|
35 |
+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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"architectures": [
|
3 |
+
"BertForTokenClassification"
|
4 |
+
],
|
5 |
+
"attention_probs_dropout_prob": 0.1,
|
6 |
+
"classifier_dropout": null,
|
7 |
+
"hidden_act": "gelu",
|
8 |
+
"hidden_dropout_prob": 0.1,
|
9 |
+
"hidden_size": 1024,
|
10 |
+
"id2label": {
|
11 |
+
"0": "ADJ",
|
12 |
+
"1": "ADJ+NOUN",
|
13 |
+
"2": "ADP",
|
14 |
+
"3": "ADP+DET",
|
15 |
+
"4": "ADV",
|
16 |
+
"5": "AUX",
|
17 |
+
"6": "B-ADJ",
|
18 |
+
"7": "B-ADP",
|
19 |
+
"8": "B-ADP+DET",
|
20 |
+
"9": "B-ADV",
|
21 |
+
"10": "B-AUX",
|
22 |
+
"11": "B-CCONJ",
|
23 |
+
"12": "B-DET",
|
24 |
+
"13": "B-INTJ",
|
25 |
+
"14": "B-NOUN",
|
26 |
+
"15": "B-NUM",
|
27 |
+
"16": "B-PRON",
|
28 |
+
"17": "B-PROPN",
|
29 |
+
"18": "B-PUNCT",
|
30 |
+
"19": "B-SCONJ",
|
31 |
+
"20": "B-VERB",
|
32 |
+
"21": "B-X",
|
33 |
+
"22": "CCONJ",
|
34 |
+
"23": "DET",
|
35 |
+
"24": "I-ADJ",
|
36 |
+
"25": "I-ADP",
|
37 |
+
"26": "I-ADP+DET",
|
38 |
+
"27": "I-ADV",
|
39 |
+
"28": "I-AUX",
|
40 |
+
"29": "I-CCONJ",
|
41 |
+
"30": "I-DET",
|
42 |
+
"31": "I-INTJ",
|
43 |
+
"32": "I-NOUN",
|
44 |
+
"33": "I-NUM",
|
45 |
+
"34": "I-PRON",
|
46 |
+
"35": "I-PROPN",
|
47 |
+
"36": "I-PUNCT",
|
48 |
+
"37": "I-SCONJ",
|
49 |
+
"38": "I-VERB",
|
50 |
+
"39": "I-X",
|
51 |
+
"40": "INTJ",
|
52 |
+
"41": "NOUN",
|
53 |
+
"42": "NUM",
|
54 |
+
"43": "PART",
|
55 |
+
"44": "PRON",
|
56 |
+
"45": "PROPN",
|
57 |
+
"46": "PUNCT",
|
58 |
+
"47": "SCONJ",
|
59 |
+
"48": "SYM",
|
60 |
+
"49": "VERB",
|
61 |
+
"50": "X"
|
62 |
+
},
|
63 |
+
"initializer_range": 0.02,
|
64 |
+
"intermediate_size": 4096,
|
65 |
+
"label2id": {
|
66 |
+
"ADJ": 0,
|
67 |
+
"ADJ+NOUN": 1,
|
68 |
+
"ADP": 2,
|
69 |
+
"ADP+DET": 3,
|
70 |
+
"ADV": 4,
|
71 |
+
"AUX": 5,
|
72 |
+
"B-ADJ": 6,
|
73 |
+
"B-ADP": 7,
|
74 |
+
"B-ADP+DET": 8,
|
75 |
+
"B-ADV": 9,
|
76 |
+
"B-AUX": 10,
|
77 |
+
"B-CCONJ": 11,
|
78 |
+
"B-DET": 12,
|
79 |
+
"B-INTJ": 13,
|
80 |
+
"B-NOUN": 14,
|
81 |
+
"B-NUM": 15,
|
82 |
+
"B-PRON": 16,
|
83 |
+
"B-PROPN": 17,
|
84 |
+
"B-PUNCT": 18,
|
85 |
+
"B-SCONJ": 19,
|
86 |
+
"B-VERB": 20,
|
87 |
+
"B-X": 21,
|
88 |
+
"CCONJ": 22,
|
89 |
+
"DET": 23,
|
90 |
+
"I-ADJ": 24,
|
91 |
+
"I-ADP": 25,
|
92 |
+
"I-ADP+DET": 26,
|
93 |
+
"I-ADV": 27,
|
94 |
+
"I-AUX": 28,
|
95 |
+
"I-CCONJ": 29,
|
96 |
+
"I-DET": 30,
|
97 |
+
"I-INTJ": 31,
|
98 |
+
"I-NOUN": 32,
|
99 |
+
"I-NUM": 33,
|
100 |
+
"I-PRON": 34,
|
101 |
+
"I-PROPN": 35,
|
102 |
+
"I-PUNCT": 36,
|
103 |
+
"I-SCONJ": 37,
|
104 |
+
"I-VERB": 38,
|
105 |
+
"I-X": 39,
|
106 |
+
"INTJ": 40,
|
107 |
+
"NOUN": 41,
|
108 |
+
"NUM": 42,
|
109 |
+
"PART": 43,
|
110 |
+
"PRON": 44,
|
111 |
+
"PROPN": 45,
|
112 |
+
"PUNCT": 46,
|
113 |
+
"SCONJ": 47,
|
114 |
+
"SYM": 48,
|
115 |
+
"VERB": 49,
|
116 |
+
"X": 50
|
117 |
+
},
|
118 |
+
"layer_norm_eps": 1e-12,
|
119 |
+
"max_position_embeddings": 512,
|
120 |
+
"model_type": "bert",
|
121 |
+
"num_attention_heads": 16,
|
122 |
+
"num_hidden_layers": 24,
|
123 |
+
"pad_token_id": 0,
|
124 |
+
"position_embedding_type": "absolute",
|
125 |
+
"task_specific_params": {
|
126 |
+
"upos_multiword": {
|
127 |
+
"ADJ+NOUN": {
|
128 |
+
"selbst\u00e4ndigeDenken\u00b8": [
|
129 |
+
"selbst\u00e4ndige",
|
130 |
+
"Denken\u00b8"
|
131 |
+
]
|
132 |
+
},
|
133 |
+
"ADP+DET": {
|
134 |
+
"A.": [
|
135 |
+
"AN",
|
136 |
+
"DEM"
|
137 |
+
],
|
138 |
+
"Am": [
|
139 |
+
"An",
|
140 |
+
"dem"
|
141 |
+
],
|
142 |
+
"Ans": [
|
143 |
+
"An",
|
144 |
+
"das"
|
145 |
+
],
|
146 |
+
"Beim": [
|
147 |
+
"Bei",
|
148 |
+
"dem"
|
149 |
+
],
|
150 |
+
"F\u00fcrs": [
|
151 |
+
"F\u00fcr",
|
152 |
+
"das"
|
153 |
+
],
|
154 |
+
"Im": [
|
155 |
+
"In",
|
156 |
+
"dem"
|
157 |
+
],
|
158 |
+
"Ins": [
|
159 |
+
"In",
|
160 |
+
"das"
|
161 |
+
],
|
162 |
+
"Ums": [
|
163 |
+
"Um",
|
164 |
+
"das"
|
165 |
+
],
|
166 |
+
"Unterm": [
|
167 |
+
"Unter",
|
168 |
+
"dem"
|
169 |
+
],
|
170 |
+
"Vom": [
|
171 |
+
"Von",
|
172 |
+
"dem"
|
173 |
+
],
|
174 |
+
"Zum": [
|
175 |
+
"Zu",
|
176 |
+
"dem"
|
177 |
+
],
|
178 |
+
"Zur": [
|
179 |
+
"Zu",
|
180 |
+
"der"
|
181 |
+
],
|
182 |
+
"am": [
|
183 |
+
"an",
|
184 |
+
"dem"
|
185 |
+
],
|
186 |
+
"ans": [
|
187 |
+
"an",
|
188 |
+
"das"
|
189 |
+
],
|
190 |
+
"aufs": [
|
191 |
+
"auf",
|
192 |
+
"das"
|
193 |
+
],
|
194 |
+
"beim": [
|
195 |
+
"bei",
|
196 |
+
"dem"
|
197 |
+
],
|
198 |
+
"durchs": [
|
199 |
+
"durch",
|
200 |
+
"das"
|
201 |
+
],
|
202 |
+
"f\u00fcrs": [
|
203 |
+
"f\u00fcr",
|
204 |
+
"das"
|
205 |
+
],
|
206 |
+
"hinterm": [
|
207 |
+
"hinter",
|
208 |
+
"dem"
|
209 |
+
],
|
210 |
+
"hinters": [
|
211 |
+
"hinter",
|
212 |
+
"das"
|
213 |
+
],
|
214 |
+
"im": [
|
215 |
+
"in",
|
216 |
+
"dem"
|
217 |
+
],
|
218 |
+
"ins": [
|
219 |
+
"in",
|
220 |
+
"das"
|
221 |
+
],
|
222 |
+
"ums": [
|
223 |
+
"um",
|
224 |
+
"das"
|
225 |
+
],
|
226 |
+
"unterm": [
|
227 |
+
"unter",
|
228 |
+
"dem"
|
229 |
+
],
|
230 |
+
"unters": [
|
231 |
+
"unter",
|
232 |
+
"das"
|
233 |
+
],
|
234 |
+
"vom": [
|
235 |
+
"von",
|
236 |
+
"dem"
|
237 |
+
],
|
238 |
+
"vorm": [
|
239 |
+
"vor",
|
240 |
+
"dem"
|
241 |
+
],
|
242 |
+
"vors": [
|
243 |
+
"vor",
|
244 |
+
"das"
|
245 |
+
],
|
246 |
+
"z.": [
|
247 |
+
"zu",
|
248 |
+
"dem"
|
249 |
+
],
|
250 |
+
"zum": [
|
251 |
+
"zu",
|
252 |
+
"dem"
|
253 |
+
],
|
254 |
+
"zur": [
|
255 |
+
"zu",
|
256 |
+
"der"
|
257 |
+
],
|
258 |
+
"\u00dcbers": [
|
259 |
+
"\u00dcber",
|
260 |
+
"das"
|
261 |
+
],
|
262 |
+
"\u00fcbers": [
|
263 |
+
"\u00fcber",
|
264 |
+
"das"
|
265 |
+
]
|
266 |
+
}
|
267 |
+
}
|
268 |
+
},
|
269 |
+
"tokenizer_class": "BertTokenizerFast",
|
270 |
+
"torch_dtype": "float32",
|
271 |
+
"transformers_version": "4.14.1",
|
272 |
+
"type_vocab_size": 2,
|
273 |
+
"use_cache": true,
|
274 |
+
"vocab_size": 31102
|
275 |
+
}
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5ecdea9d42e912d9c063b4d41d8b9303228459b4a2ecaa251b698a774b540618
|
3 |
+
size 1339114865
|
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:c64f0a1fab8269b2ccf6aadb2b8fa773c9784b7a6009c773f90c9a0cdfe80750
|
3 |
+
size 1420617381
|
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": false, "unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]", "tokenize_chinese_chars": true, "strip_accents": false, "model_max_length": 512, "do_basic_tokenize": true, "tokenizer_class": "BertTokenizerFast"}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|