Mizuiro-sakura commited on
Commit
7e1ea44
·
1 Parent(s): a4c6768

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +74 -0
README.md CHANGED
@@ -1,3 +1,77 @@
1
  ---
2
  license: mit
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: mit
3
+ language: ja
4
+ tags:
5
+ - luke
6
+ - pytorch
7
+ - transformers
8
+ - ner
9
+ - 固有表現抽出
10
+ - named entity recognition
11
+ - named-entity-recognition
12
+
13
  ---
14
+
15
+ # このモデルはluke-japanese-largeをファインチューニングして、固有表現抽出(NER)に用いれるようにしたものです。
16
+ このモデルはluke-japanese-largeを
17
+ Wikipediaを用いた日本語の固有表現抽出データセット(ストックマーク社、https://github.com/stockmarkteam/ner-wikipedia-dataset )を用いてファインチューニングしたものです。
18
+
19
+ 固有表現抽出(NER)タスクに用いることができます。
20
+
21
+ # This model is fine-tuned model for Named-Entity-Recognition(NER) which is based on luke-japanese-large
22
+
23
+ This model is fine-tuned by using Wikipedia dataset.
24
+
25
+ You could use this model for NER tasks.
26
+
27
+ # モデルの精度 accuracy of model
28
+ 全体:0.8453191098032002
29
+ precision recall f1-score support
30
+
31
+ その他の組織名 0.78 0.79 0.79 238
32
+ イベント名 0.83 0.88 0.85 215
33
+ 人名 0.88 0.89 0.89 546
34
+ 地名 0.83 0.85 0.84 440
35
+ 政治的組織名 0.80 0.84 0.82 263
36
+ 施設名 0.79 0.84 0.81 241
37
+ 法人名 0.88 0.89 0.89 487
38
+ 製品名 0.79 0.80 0.79 252
39
+
40
+ micro avg 0.83 0.86 0.85 2682
41
+ macro avg 0.82 0.85 0.83 2682
42
+ weighted avg 0.83 0.86 0.85 2682
43
+
44
+
45
+ # How to use 使い方
46
+ sentencepieceとtransformersをインストールして (pip install sentencepiece , pip install transformers)
47
+ 以下のコードを実行することで、NERタスクを解かせることができます。
48
+ please execute this code.
49
+ ```python
50
+ from transformers import MLukeTokenizer,pipeline, LukeForTokenClassification
51
+
52
+ tokenizer = MLukeTokenizer.from_pretrained('Mizuiro-sakura/luke-japanese-large-finetuned-ner')
53
+ model=LukeForTokenClassification.from_pretrained('Mizuiro-sakura/luke-japanese-large-finetuned-ner') # 学習済みモデルの読み込み
54
+
55
+ text=('昨日は東京で買い物をした')
56
+
57
+ ner=pipeline('ner', model=model, tokenizer=tokenizer)
58
+
59
+ result=ner(text)
60
+ print(result)
61
+ ```
62
+
63
+
64
+ # what is Luke? Lukeとは?[1]
65
+ LUKE (Language Understanding with Knowledge-based Embeddings) is a new pre-trained contextualized representation of words and entities based on transformer. LUKE treats words and entities in a given text as independent tokens, and outputs contextualized representations of them. LUKE adopts an entity-aware self-attention mechanism that is an extension of the self-attention mechanism of the transformer, and considers the types of tokens (words or entities) when computing attention scores.
66
+
67
+ LUKE achieves state-of-the-art results on five popular NLP benchmarks including SQuAD v1.1 (extractive question answering), CoNLL-2003 (named entity recognition), ReCoRD (cloze-style question answering), TACRED (relation classification), and Open Entity (entity typing). luke-japaneseは、単語とエンティティの知識拡張型訓練済み Transformer モデルLUKEの日本語版です。LUKE は単語とエンティティを独立したトークンとして扱い、これらの文脈を考慮した表現を出力します。
68
+
69
+ # Acknowledgments 謝辞
70
+ Lukeの開発者である山田先生とStudio ousiaさんには感謝いたします。 I would like to thank Mr.Yamada @ikuyamada and Studio ousia @StudioOusia.
71
+
72
+ # Citation
73
+ [1]@inproceedings{yamada2020luke, title={LUKE: Deep Contextualized Entity Representations with Entity-aware Self-attention}, author={Ikuya Yamada and Akari Asai and Hiroyuki Shindo and Hideaki Takeda and Yuji Matsumoto}, booktitle={EMNLP}, year={2020} }
74
+
75
+
76
+
77
+