KoichiYasuoka commited on
Commit
e1fd365
1 Parent(s): 514695a

initial release

Browse files
README.md ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - "ja"
4
+ tags:
5
+ - "japanese"
6
+ - "token-classification"
7
+ - "pos"
8
+ license: "cc-by-sa-4.0"
9
+ pipeline_tag: "token-classification"
10
+ widget:
11
+ - text: "国境の長いトンネルを抜けると雪国であった。"
12
+ ---
13
+
14
+ # roberta-small-japanese-luw-upos
15
+
16
+ ## Model Description
17
+
18
+ This is a RoBERTa model pre-trained on Japanese 青空文庫 texts for POS-tagging, derived from [roberta-small-japanese-aozora](https://huggingface.co/KoichiYasuoka/roberta-small-japanese-aozora). Every long-unit-word is tagged by [UPOS](https://universaldependencies.org/u/pos/) (Universal Part-Of-Speech).
19
+
20
+ ## How to Use
21
+
22
+ ```py
23
+ from transformers import AutoTokenizer,AutoModelForTokenClassification,TokenClassificationPipeline
24
+ tokenizer=AutoTokenizer.from_pretrained("KoichiYasuoka/roberta-small-japanese-luw-upos")
25
+ model=AutoModelForTokenClassification.from_pretrained("KoichiYasuoka/roberta-small-japanese-luw-upos")
26
+ pipeline=TokenClassificationPipeline(tokenizer=tokenizer,model=model,aggregation_strategy="simple")
27
+ print([(t["word"],t["entity_group"]) for t in pipeline("国境の長いトンネルを抜けると雪国であった。")])
28
+ ```
29
+
config.json ADDED
@@ -0,0 +1,129 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "RobertaForTokenClassification"
4
+ ],
5
+ "attention_probs_dropout_prob": 0.1,
6
+ "bos_token_id": 2,
7
+ "classifier_dropout": null,
8
+ "eos_token_id": 3,
9
+ "hidden_act": "gelu",
10
+ "hidden_dropout_prob": 0.1,
11
+ "hidden_size": 256,
12
+ "id2label": {
13
+ "0": "I-ADJ",
14
+ "1": "I-NUM",
15
+ "2": "I-ADV",
16
+ "3": "B-ADP",
17
+ "4": "I-NOUN",
18
+ "5": "I-DET",
19
+ "6": "B-ADV",
20
+ "7": "I-VERB",
21
+ "8": "VERB",
22
+ "9": "I-CCONJ",
23
+ "10": "AUX",
24
+ "11": "I-SCONJ",
25
+ "12": "B-DET",
26
+ "13": "B-ADJ",
27
+ "14": "I-PART",
28
+ "15": "ADV",
29
+ "16": "B-INTJ",
30
+ "17": "X",
31
+ "18": "CCONJ",
32
+ "19": "NOUN",
33
+ "20": "B-AUX",
34
+ "21": "INTJ",
35
+ "22": "B-SYM",
36
+ "23": "SCONJ",
37
+ "24": "I-INTJ",
38
+ "25": "ADJ",
39
+ "26": "B-PRON",
40
+ "27": "B-X",
41
+ "28": "DET",
42
+ "29": "SYM",
43
+ "30": "I-PRON",
44
+ "31": "I-SYM",
45
+ "32": "PUNCT",
46
+ "33": "I-PROPN",
47
+ "34": "I-AUX",
48
+ "35": "PART",
49
+ "36": "B-NUM",
50
+ "37": "I-X",
51
+ "38": "B-SCONJ",
52
+ "39": "B-PROPN",
53
+ "40": "B-PART",
54
+ "41": "I-ADP",
55
+ "42": "B-VERB",
56
+ "43": "ADP",
57
+ "44": "PROPN",
58
+ "45": "B-NOUN",
59
+ "46": "PRON",
60
+ "47": "B-CCONJ",
61
+ "48": "NUM"
62
+ },
63
+ "initializer_range": 0.02,
64
+ "intermediate_size": 768,
65
+ "label2id": {
66
+ "ADJ": 25,
67
+ "ADP": 43,
68
+ "ADV": 15,
69
+ "AUX": 10,
70
+ "B-ADJ": 13,
71
+ "B-ADP": 3,
72
+ "B-ADV": 6,
73
+ "B-AUX": 20,
74
+ "B-CCONJ": 47,
75
+ "B-DET": 12,
76
+ "B-INTJ": 16,
77
+ "B-NOUN": 45,
78
+ "B-NUM": 36,
79
+ "B-PART": 40,
80
+ "B-PRON": 26,
81
+ "B-PROPN": 39,
82
+ "B-SCONJ": 38,
83
+ "B-SYM": 22,
84
+ "B-VERB": 42,
85
+ "B-X": 27,
86
+ "CCONJ": 18,
87
+ "DET": 28,
88
+ "I-ADJ": 0,
89
+ "I-ADP": 41,
90
+ "I-ADV": 2,
91
+ "I-AUX": 34,
92
+ "I-CCONJ": 9,
93
+ "I-DET": 5,
94
+ "I-INTJ": 24,
95
+ "I-NOUN": 4,
96
+ "I-NUM": 1,
97
+ "I-PART": 14,
98
+ "I-PRON": 30,
99
+ "I-PROPN": 33,
100
+ "I-SCONJ": 11,
101
+ "I-SYM": 31,
102
+ "I-VERB": 7,
103
+ "I-X": 37,
104
+ "INTJ": 21,
105
+ "NOUN": 19,
106
+ "NUM": 48,
107
+ "PART": 35,
108
+ "PRON": 46,
109
+ "PROPN": 44,
110
+ "PUNCT": 32,
111
+ "SCONJ": 23,
112
+ "SYM": 29,
113
+ "VERB": 8,
114
+ "X": 17
115
+ },
116
+ "layer_norm_eps": 1e-12,
117
+ "max_position_embeddings": 128,
118
+ "model_type": "roberta",
119
+ "num_attention_heads": 4,
120
+ "num_hidden_layers": 12,
121
+ "pad_token_id": 0,
122
+ "position_embedding_type": "absolute",
123
+ "tokenizer_class": "RemBertTokenizerFast",
124
+ "torch_dtype": "float32",
125
+ "transformers_version": "4.12.2",
126
+ "type_vocab_size": 2,
127
+ "use_cache": true,
128
+ "vocab_size": 250315
129
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:61570f5cec74f8145fa5c719e8bb74d9afcb1d8991f0f4d57133c72eb77a8027
3
+ size 288191601
sentencepiece.model ADDED
File without changes
special_tokens_map.json ADDED
@@ -0,0 +1 @@
 
1
+ {"bos_token": "[CLS]", "eos_token": "[SEP]", "unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": {"content": "[MASK]", "single_word": false, "lstrip": true, "rstrip": false, "normalized": true}}
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, "remove_space": true, "keep_accents": true, "bos_token": "[CLS]", "eos_token": "[SEP]", "unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": {"content": "[MASK]", "single_word": false, "lstrip": true, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "model_max_length": 128, "tokenizer_class": "RemBertTokenizer"}