KoichiYasuoka
commited on
Commit
·
b3e2c70
1
Parent(s):
75c70be
initial release
Browse files- README.md +45 -0
- config.json +0 -0
- pytorch_model.bin +3 -0
- special_tokens_map.json +51 -0
- supar.model +3 -0
- tokenizer.json +0 -0
- tokenizer_config.json +55 -0
README.md
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- "ko"
|
4 |
+
tags:
|
5 |
+
- "korean"
|
6 |
+
- "token-classification"
|
7 |
+
- "pos"
|
8 |
+
- "dependency-parsing"
|
9 |
+
datasets:
|
10 |
+
- "universal_dependencies"
|
11 |
+
license: "apache-2.0"
|
12 |
+
pipeline_tag: "token-classification"
|
13 |
+
widget:
|
14 |
+
- text: "홍시 맛이 나서 홍시라 생각한다."
|
15 |
+
- text: "紅柹 맛이 나서 紅柹라 生覺한다."
|
16 |
+
---
|
17 |
+
|
18 |
+
# deberta-base-korean-morph-upos
|
19 |
+
|
20 |
+
## Model Description
|
21 |
+
|
22 |
+
This is a RoBERTa model pre-trained on Korean texts for POS-tagging and dependency-parsing, derived from [deberta-v3-base-korean](https://huggingface.co/team-lucid/deberta-v3-base-korean) and [morphUD-korean](https://github.com/jungyeul/morphUD-korean). Every morpheme (형태소) is tagged by [UPOS](https://universaldependencies.org/u/pos/)(Universal Part-Of-Speech).
|
23 |
+
|
24 |
+
## How to Use
|
25 |
+
|
26 |
+
```py
|
27 |
+
from transformers import AutoTokenizer,AutoModelForTokenClassification,TokenClassificationPipeline
|
28 |
+
tokenizer=AutoTokenizer.from_pretrained("KoichiYasuoka/deberta-base-korean-morph-upos")
|
29 |
+
model=AutoModelForTokenClassification.from_pretrained("KoichiYasuoka/deberta-base-korean-morph-upos")
|
30 |
+
pipeline=TokenClassificationPipeline(tokenizer=tokenizer,model=model,aggregation_strategy="simple")
|
31 |
+
nlp=lambda x:[(x[t["start"]:t["end"]],t["entity_group"]) for t in pipeline(x)]
|
32 |
+
print(nlp("홍시 맛이 나서 홍시라 생각한다."))
|
33 |
+
```
|
34 |
+
|
35 |
+
or
|
36 |
+
|
37 |
+
```py
|
38 |
+
import esupar
|
39 |
+
nlp=esupar.load("KoichiYasuoka/deberta-base-korean-morph-upos")
|
40 |
+
print(nlp("홍시 맛이 나서 홍시라 생각한다."))
|
41 |
+
```
|
42 |
+
|
43 |
+
## See Also
|
44 |
+
|
45 |
+
[esupar](https://github.com/KoichiYasuoka/esupar): Tokenizer POS-tagger and Dependency-parser with BERT/RoBERTa/DeBERTa models
|
config.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0e3a83ab25f9059b283b593eb4ac9a0450b2bf11d949dd6741aca05a066b8f86
|
3 |
+
size 542314863
|
special_tokens_map.json
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": {
|
3 |
+
"content": "[CLS]",
|
4 |
+
"lstrip": false,
|
5 |
+
"normalized": false,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": false
|
8 |
+
},
|
9 |
+
"cls_token": {
|
10 |
+
"content": "[CLS]",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": false,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"eos_token": {
|
17 |
+
"content": "[SEP]",
|
18 |
+
"lstrip": false,
|
19 |
+
"normalized": false,
|
20 |
+
"rstrip": false,
|
21 |
+
"single_word": false
|
22 |
+
},
|
23 |
+
"mask_token": {
|
24 |
+
"content": "[MASK]",
|
25 |
+
"lstrip": false,
|
26 |
+
"normalized": false,
|
27 |
+
"rstrip": false,
|
28 |
+
"single_word": false
|
29 |
+
},
|
30 |
+
"pad_token": {
|
31 |
+
"content": "[PAD]",
|
32 |
+
"lstrip": false,
|
33 |
+
"normalized": false,
|
34 |
+
"rstrip": false,
|
35 |
+
"single_word": false
|
36 |
+
},
|
37 |
+
"sep_token": {
|
38 |
+
"content": "[SEP]",
|
39 |
+
"lstrip": false,
|
40 |
+
"normalized": false,
|
41 |
+
"rstrip": false,
|
42 |
+
"single_word": false
|
43 |
+
},
|
44 |
+
"unk_token": {
|
45 |
+
"content": "[UNK]",
|
46 |
+
"lstrip": false,
|
47 |
+
"normalized": false,
|
48 |
+
"rstrip": false,
|
49 |
+
"single_word": false
|
50 |
+
}
|
51 |
+
}
|
supar.model
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:23ba0acd11e8177739087bd90d1e18fc3cd32c4188c3206e8b5e1f92ab3a1a8d
|
3 |
+
size 587550695
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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": "[CLS]",
|
13 |
+
"lstrip": false,
|
14 |
+
"normalized": false,
|
15 |
+
"rstrip": false,
|
16 |
+
"single_word": false,
|
17 |
+
"special": true
|
18 |
+
},
|
19 |
+
"2": {
|
20 |
+
"content": "[SEP]",
|
21 |
+
"lstrip": false,
|
22 |
+
"normalized": false,
|
23 |
+
"rstrip": false,
|
24 |
+
"single_word": false,
|
25 |
+
"special": true
|
26 |
+
},
|
27 |
+
"3": {
|
28 |
+
"content": "[UNK]",
|
29 |
+
"lstrip": false,
|
30 |
+
"normalized": false,
|
31 |
+
"rstrip": false,
|
32 |
+
"single_word": false,
|
33 |
+
"special": true
|
34 |
+
},
|
35 |
+
"64000": {
|
36 |
+
"content": "[MASK]",
|
37 |
+
"lstrip": false,
|
38 |
+
"normalized": false,
|
39 |
+
"rstrip": false,
|
40 |
+
"single_word": false,
|
41 |
+
"special": true
|
42 |
+
}
|
43 |
+
},
|
44 |
+
"bos_token": "[CLS]",
|
45 |
+
"clean_up_tokenization_spaces": true,
|
46 |
+
"cls_token": "[CLS]",
|
47 |
+
"do_lower_case": false,
|
48 |
+
"eos_token": "[SEP]",
|
49 |
+
"mask_token": "[MASK]",
|
50 |
+
"pad_token": "[PAD]",
|
51 |
+
"sep_token": "[SEP]",
|
52 |
+
"split_by_punct": false,
|
53 |
+
"tokenizer_class": "DebertaV2TokenizerFast",
|
54 |
+
"unk_token": "[UNK]"
|
55 |
+
}
|