KoichiYasuoka commited on
Commit
ab046a1
β€’
1 Parent(s): 476157a

initial release

Browse files
README.md ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - "zh"
4
+ tags:
5
+ - "chinese"
6
+ - "token-classification"
7
+ - "pos"
8
+ - "dependency-parsing"
9
+ datasets:
10
+ - "universal_dependencies"
11
+ license: "cc-by-sa-4.0"
12
+ pipeline_tag: "token-classification"
13
+ ---
14
+
15
+ # roberta-base-chinese-upos
16
+
17
+ ## Model Description
18
+
19
+ This is a RoBERTa model pre-trained on Chinese texts (both simplified and traditional) for POS-tagging and dependency-parsing, derived from [roberta_chinese_base](https://huggingface.co/clue/roberta_chinese_base). 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/roberta-base-chinese-upos")
26
+ model=AutoModelForTokenClassification.from_pretrained("KoichiYasuoka/roberta-base-chinese-upos")
27
+ ```
28
+
29
+ or
30
+
31
+ ```py
32
+ import esupar
33
+ nlp=esupar.load("KoichiYasuoka/roberta-base-chinese-upos")
34
+ ```
35
+
36
+ ## See Also
37
+
38
+ [esupar](https://github.com/KoichiYasuoka/esupar): Tokenizer POS-tagger and Dependency-parser with BERT/RoBERTa/DeBERTa models
39
+
config.json ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "RobertaForTokenClassification"
4
+ ],
5
+ "attention_probs_dropout_prob": 0.1,
6
+ "bos_token_id": 0,
7
+ "classifier_dropout": null,
8
+ "directionality": "bidi",
9
+ "eos_token_id": 2,
10
+ "hidden_act": "gelu",
11
+ "hidden_dropout_prob": 0.1,
12
+ "hidden_size": 768,
13
+ "id2label": {
14
+ "0": "ADJ",
15
+ "1": "ADP",
16
+ "2": "ADV",
17
+ "3": "AUX",
18
+ "4": "B-ADJ",
19
+ "5": "B-ADP",
20
+ "6": "B-ADV",
21
+ "7": "B-AUX",
22
+ "8": "B-CCONJ",
23
+ "9": "B-DET",
24
+ "10": "B-NOUN",
25
+ "11": "B-NUM",
26
+ "12": "B-PART",
27
+ "13": "B-PRON",
28
+ "14": "B-PROPN",
29
+ "15": "B-PUNCT",
30
+ "16": "B-SYM",
31
+ "17": "B-VERB",
32
+ "18": "B-X",
33
+ "19": "CCONJ",
34
+ "20": "DET",
35
+ "21": "I-ADJ",
36
+ "22": "I-ADP",
37
+ "23": "I-ADV",
38
+ "24": "I-AUX",
39
+ "25": "I-CCONJ",
40
+ "26": "I-DET",
41
+ "27": "I-NOUN",
42
+ "28": "I-NUM",
43
+ "29": "I-PART",
44
+ "30": "I-PRON",
45
+ "31": "I-PROPN",
46
+ "32": "I-PUNCT",
47
+ "33": "I-SYM",
48
+ "34": "I-VERB",
49
+ "35": "I-X",
50
+ "36": "NOUN",
51
+ "37": "NUM",
52
+ "38": "PART",
53
+ "39": "PRON",
54
+ "40": "PROPN",
55
+ "41": "PUNCT",
56
+ "42": "SYM",
57
+ "43": "VERB",
58
+ "44": "X"
59
+ },
60
+ "initializer_range": 0.02,
61
+ "intermediate_size": 3072,
62
+ "label2id": {
63
+ "ADJ": 0,
64
+ "ADP": 1,
65
+ "ADV": 2,
66
+ "AUX": 3,
67
+ "B-ADJ": 4,
68
+ "B-ADP": 5,
69
+ "B-ADV": 6,
70
+ "B-AUX": 7,
71
+ "B-CCONJ": 8,
72
+ "B-DET": 9,
73
+ "B-NOUN": 10,
74
+ "B-NUM": 11,
75
+ "B-PART": 12,
76
+ "B-PRON": 13,
77
+ "B-PROPN": 14,
78
+ "B-PUNCT": 15,
79
+ "B-SYM": 16,
80
+ "B-VERB": 17,
81
+ "B-X": 18,
82
+ "CCONJ": 19,
83
+ "DET": 20,
84
+ "I-ADJ": 21,
85
+ "I-ADP": 22,
86
+ "I-ADV": 23,
87
+ "I-AUX": 24,
88
+ "I-CCONJ": 25,
89
+ "I-DET": 26,
90
+ "I-NOUN": 27,
91
+ "I-NUM": 28,
92
+ "I-PART": 29,
93
+ "I-PRON": 30,
94
+ "I-PROPN": 31,
95
+ "I-PUNCT": 32,
96
+ "I-SYM": 33,
97
+ "I-VERB": 34,
98
+ "I-X": 35,
99
+ "NOUN": 36,
100
+ "NUM": 37,
101
+ "PART": 38,
102
+ "PRON": 39,
103
+ "PROPN": 40,
104
+ "PUNCT": 41,
105
+ "SYM": 42,
106
+ "VERB": 43,
107
+ "X": 44
108
+ },
109
+ "layer_norm_eps": 1e-12,
110
+ "max_position_embeddings": 512,
111
+ "model_type": "roberta",
112
+ "num_attention_heads": 12,
113
+ "num_hidden_layers": 12,
114
+ "pad_token_id": 1,
115
+ "pooler_fc_size": 768,
116
+ "pooler_num_attention_heads": 12,
117
+ "pooler_num_fc_layers": 3,
118
+ "pooler_size_per_head": 128,
119
+ "pooler_type": "first_token_transform",
120
+ "position_embedding_type": "absolute",
121
+ "tokenizer_class": "BertTokenizerFast",
122
+ "torch_dtype": "float32",
123
+ "transformers_version": "4.22.1",
124
+ "type_vocab_size": 2,
125
+ "use_cache": true,
126
+ "vocab_size": 21597
127
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:305e81a16f5b20ff11b09aaeea01014e40c365bcc02d5bd00713380f5b8a993e
3
+ size 408358385
special_tokens_map.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": "[CLS]",
3
+ "mask_token": "[MASK]",
4
+ "pad_token": "[PAD]",
5
+ "sep_token": "[SEP]",
6
+ "unk_token": "[UNK]"
7
+ }
supar.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0e9bf4487e3af63ddefe9d887fdaa2c55b9e752d066f50246a88fbd54901675b
3
+ size 463345253
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": "[CLS]",
3
+ "do_basic_tokenize": true,
4
+ "do_lower_case": true,
5
+ "mask_token": "[MASK]",
6
+ "model_max_length": 512,
7
+ "never_split": null,
8
+ "pad_token": "[PAD]",
9
+ "sep_token": "[SEP]",
10
+ "strip_accents": null,
11
+ "tokenize_chinese_chars": true,
12
+ "tokenizer_class": "BertTokenizerFast",
13
+ "unk_token": "[UNK]"
14
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff