├── LICENSE.md
├── README.md
├── docs
├── index.html
└── static
│ ├── css
│ └── style.css
│ └── js
│ ├── load_data.js
│ └── script.js
└── ner.json
/LICENSE.md:
--------------------------------------------------------------------------------
1 | 本データセットはWikipedia日本語版と同じCC-BY-SA 3.0のライセンスに従います。(参考:[Wikipediaの著作権](https://ja.wikipedia.org/wiki/Wikipedia:%E8%91%97%E4%BD%9C%E6%A8%A9))
2 |
3 | 商用利用も可能です。
4 |
5 | このデータセットを改変・再配布される方は、Wikipediaの[こちら](https://ja.wikipedia.org/wiki/Wikipedia:%E3%82%A6%E3%82%A3%E3%82%AD%E3%83%9A%E3%83%87%E3%82%A3%E3%82%A2%E3%82%92%E4%BA%8C%E6%AC%A1%E5%88%A9%E7%94%A8%E3%81%99%E3%82%8B)のページを参考にしてください。
6 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Wikipediaを用いた日本語の固有表現抽出データセット
2 |
3 | **Version: 2.0**
4 |
5 | HuggingFace Hubからも利用可能です:https://huggingface.co/datasets/stockmark/ner-wikipedia-dataset
6 |
7 | ## 概要
8 |
9 | このデータセットはWikipediaから抜き出した文に対して、固有表現をタグ付けしたものです。固有表現をハイライトしたサンプルは[こちら](https://stockmarkteam.github.io/ner-wikipedia-dataset/index.html)でご覧になれます。全データ数は5343で、各データは一文から構成されています。全体の10%程度が固有表現を含まない負例です。このデータセットでタグ付された固有表現のタイプと、それぞれのタイプごとの固有表現数は以下の表にまとめられます。
10 |
11 | |タイプ|固有表現数|備考|
12 | |:--|:--:|:--|
13 | |人名|2980||
14 | |法人名|2485|法人または法人に類する組織|
15 | |政治的組織名|1180|政治的組織名、政党名、政府組織名、行政組織名、軍隊名、国際組織名|
16 | |その他の組織名|1051|競技組織名、公演組織名、その他|
17 | |地名|2157||
18 | |施設名|1108||
19 | |製品名|1215|商品名、番組名、映画名、書籍名、歌名、ブランド名等|
20 | |イベント名|1009||
21 |
22 | ## データ形式
23 |
24 | データファイル: ner.json
25 |
26 | データファイルはjson形式で、全体としてはデータサンプルのリストとして構成されています。各データは以下のような辞書形式です。
27 |
28 | ```
29 | {
30 | "curid": "473536",
31 | "text": "イギリスはリーマンショック直後の2008年10月にイングランド銀行のバランスシートを一気に3倍近く増やした後、2008年11月から2009年3月にかけて段階的に縮小させていった。",
32 | "entities": [
33 | {
34 | "name": "イギリス",
35 | "span": [0,4],
36 | "type": "地名"
37 | },
38 | {
39 | "name": "リーマンショック",
40 | "span": [5,13],
41 | "type": "イベント名"
42 | },
43 | {
44 | "name": "イングランド銀行",
45 | "span": [25,33],
46 | "type": "政治的組織名"
47 | }
48 | ]
49 | }
50 | ```
51 |
52 | - curidはデータ元のWikipediaのページID
53 | - textはタグ付を行う対象のテキスト
54 | - entitiesは固有表現のリスト
55 | - nameは固有表現名
56 | - spanはtextでの位置
57 | - typeは固有表現のタイプ
58 |
59 | ## ライセンス
60 |
61 | Wikipedia日本語版と同じCC-BY-SA 3.0のライセンスに従います。(参考:[Wikipediaの著作権](https://ja.wikipedia.org/wiki/Wikipedia:%E8%91%97%E4%BD%9C%E6%A8%A9))
62 |
63 | 商用利用も可能です。
64 |
65 | このデータセットを改変・再配布される方は、Wikipediaの[こちら](https://ja.wikipedia.org/wiki/Wikipedia:%E3%82%A6%E3%82%A3%E3%82%AD%E3%83%9A%E3%83%87%E3%82%A3%E3%82%A2%E3%82%92%E4%BA%8C%E6%AC%A1%E5%88%A9%E7%94%A8%E3%81%99%E3%82%8B)のページを参考にしてください。
66 |
67 | ## 参考文献
68 |
69 | 近江崇宏、「Wikipediaを用いた日本語の固有表現抽出のデータセットの構築」、言語処理学会 第27回年次大会(2021)[PDF](https://anlp.jp/proceedings/annual_meeting/2021/pdf_dir/P2-7.pdf)
70 |
71 | ## 作成
72 |
73 | 本データセットはストックマーク株式会社により作成されました。
74 | https://stockmark.co.jp/
75 |
--------------------------------------------------------------------------------
/docs/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
Wikipedia 固有表現抽出データセット (サンプル)
15 |
16 |
17 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/docs/static/css/style.css:
--------------------------------------------------------------------------------
1 | *{
2 | margin: 0px;
3 | padding: 0px;
4 | }
5 |
6 | body{
7 | background-color:#ffffff;
8 | height:100vh;
9 | display:grid;
10 | grid-template-columns: 100vw;
11 | grid-template-rows: 75px 1fr;
12 | grid-template-areas:
13 | "grid_top"
14 | "grid_main";
15 | }
16 |
17 | #grid_top{
18 | grid-area: grid_top;
19 | background-color: #555555;
20 | color:#eeeeee;
21 | padding:25px 50px 25px 50px;
22 | box-shadow: 0px 4px 4px gray;
23 | z-index:1000;
24 | display: flex;
25 | justify-content: space-between;
26 | align-items: center;
27 | }
28 |
29 | #form_main{
30 | display: flex;
31 | justify-content: flex-start;
32 | align-items: center;
33 | }
34 |
35 | #grid_top input[type='text']{
36 | width: 150px;
37 | padding: 5px 5px;
38 | margin:0px 0px 0px 0px;
39 | border-radius: 3px;
40 | border: 1px solid #000000;
41 | box-sizing: border-box;
42 | }
43 |
44 | #grid_top button{
45 | height:25px;
46 | margin:0px 0px 0px 5px;
47 | padding:3px;
48 | border-radius:2px;
49 | box-sizing: border-box;
50 | background-color:#555555;
51 | color:#00ff00;
52 | font-weight:bold;
53 | border:1px solid #00ff00;
54 | }
55 |
56 | #grid_top button:focus{
57 | outline:0;
58 | }
59 |
60 | #grid_top button:hover{
61 | background-color:#28a745;
62 | color:#ffffff;
63 | border:2px solid #28a745;
64 | }
65 |
66 | #grid_top button:active{
67 | background-color:#555555;
68 | color:#00ff00;
69 | font-weight:bold;
70 | border:1px solid #00ff00;
71 | }
72 |
73 | #grid_top span{
74 | margin:0px 0px 0px 5px;
75 | }
76 |
77 | #option_controller {
78 | background-color: #ccc;
79 | color: #000;
80 | position: fixed;
81 | right: 50px;
82 | top: 60px;
83 | padding: 10px;
84 | box-shadow: 0px 4px 4px gray;
85 | }
86 |
87 |
88 | #grid_main{
89 | grid-area: grid_main;
90 | padding:10px 50px 10px 50px;
91 | overflow:auto;
92 | }
93 |
94 | .article_box{
95 | margin: 10px 0px;
96 | padding: 0px;
97 | }
98 |
99 | .checkbox_remove{
100 | margin: 10px;
101 | }
102 |
103 | .annotation_text{
104 | background: #ffffff;
105 | border-radius: 10px;
106 | margin: 0px;
107 | padding:15px;
108 | line-height: 150%;
109 | border: 3px solid #dddddd;
110 | }
111 |
112 | .annotation_text.checked {
113 | background-color: #ffe;
114 | }
115 |
116 | span[data-entity_type]{
117 | border-radius: 3px;
118 | cursor:pointer;
119 | }
120 | span[data-entity_type='1']{
121 | background-color: #faa;
122 | }
123 | span[data-entity_type='2']{
124 | background-color: #afa;
125 | }
126 | span[data-entity_type='3']{
127 | background-color: #ffdf0f;
128 | }
129 | span[data-entity_type='4']{
130 | background-color: #9eccf8;
131 | }
132 | span[data-entity_type='5']{
133 | background-color: #bf8ed8;
134 | }
135 | span[data-entity_type='6']{
136 | background-color: #ff9400;
137 | }
138 | span[data-entity_type='7']{
139 | background-color: #fff;
140 | border: solid 3px #faa;
141 | }
142 | span[data-entity_type='8']{
143 | background-color: #fff;
144 | border: solid 3px #afa;
145 | }
146 | span[data-entity_type='9']{
147 | background-color: #fff;
148 | border: solid 3px #aaf;
149 | }
150 |
151 | .entity_controller{
152 | position: absolute;
153 | background-color: #fff;
154 | padding:5px;
155 | display:flex;
156 | flex-direction:row;
157 | justify-content: center;
158 | flex-wrap:wrap;
159 | width:180px;
160 | border:solid 1px #aaa;
161 | }
162 | .entity_controller>span{
163 | margin:1px;
164 | }
165 | .entity_controller>.remove_button{
166 | margin:10px 1px 1px 1px;
167 | }
168 |
169 |
--------------------------------------------------------------------------------
/docs/static/js/load_data.js:
--------------------------------------------------------------------------------
1 | sample = [
2 | {
3 | "curid": "391920",
4 | "text": "2010年1月4日に、{{2|東海東京フィナンシャル・ホールディングス株式会社}}に譲渡され、同社の完全子会社となる。"
5 | },
6 | {
7 | "curid": "4029454",
8 | "text": "{{1|三宅川百太郎}}は、{{5|日本}}の実業家。"
9 | },
10 | {
11 | "curid": "544078",
12 | "text": "創業当時の社名は{{2|湧永薬品}}。"
13 | },
14 | {
15 | "curid": "222355",
16 | "text": "同月5日には、{{2|トヨタファイナンシャルサービス証券株式会社}}を吸収合併。"
17 | },
18 | {
19 | "curid": "1944837",
20 | "text": "1937年、{{1|Bettina Bergengruen}}と結婚。"
21 | },
22 | {
23 | "curid": "2873620",
24 | "text": "1979年の{{8|NHK杯}}では7位となる。"
25 | },
26 | {
27 | "curid": "833699",
28 | "text": "{{7|NHKスペシャル}}「{{7|1000人に聞くハケンの本音}}」で、脚本家の{{1|中園ミホ}}と意見が対立。"
29 | },
30 | {
31 | "curid": "3566215",
32 | "text": "{{1|クリス・プリチャード}}は長年にわたって義父と互いに敵意を抱き合っていた。"
33 | },
34 | {
35 | "curid": "1947476",
36 | "text": "1956年に{{1|ヨアヒム=フリードリヒ・フート}}は{{5|西ドイツ}}の再軍備で設立された{{3|ドイツ連邦軍}}に少将の階級で入隊した。"
37 | },
38 | {
39 | "curid": "4013642",
40 | "text": "7月22日から24日にかけて{{8|会津田島祇園祭}}が行われる。"
41 | },
42 | {
43 | "curid": "883458",
44 | "text": "1990年代末頃から{{2|サベナ・ベルギー航空}}や{{2|AOMフランス航空}}などハンター戦略によって傘下におさめた航空会社の業績が急速に悪化し、{{2|スイス航空}}の経営にも悪影響を及ぼし始める。"
45 | },
46 | {
47 | "curid": "2692116",
48 | "text": "{{3|アメリカ食品医薬品局}}の有害事象報告システムでは、ピオグリタゾンの報告の2.63%が膀胱癌であった。"
49 | },
50 | {
51 | "curid": "800619",
52 | "text": "1877年ごろ、{{1|ウィリアム・ヘンリー・ヴァンダービルト}}と{{1|ジェイ・グールド}}の二人の偉大な鉄道開発者達は{{5|五大湖}}の南に鉄道の敷設を構想した。"
53 | },
54 | {
55 | "curid": "233663",
56 | "text": "{{2|奈良交通}}の完全子会社で、{{2|奈良交通}}より移管された路線の運行を担う。"
57 | },
58 | {
59 | "curid": "1090388",
60 | "text": "本曲を題材にした映画は1968年8月1日に公開。"
61 | },
62 | {
63 | "curid": "2373179",
64 | "text": "その後は{{5|オーストリア}}の{{4|SKシュトゥルム・グラーツ}}などでプレー、最終的に{{4|FCセト34}}でそのキャリアに幕を下ろした。"
65 | },
66 | {
67 | "curid": "1139391",
68 | "text": "また、1990年代頃から{{2|ICI}}は大量生産の工業化学分野から特殊化学品分野への志向を強め、より高収益かつ成長性の高い製品取り扱いを強めている。"
69 | },
70 | {
71 | "curid": "207344",
72 | "text": "また、{{2|TBS}}が制作に参加していないライブを独占生中継することもある。"
73 | },
74 | {
75 | "curid": "4345",
76 | "text": "{{2|日本国有鉄道}}を含む{{5|日本}}の官設鉄道・国有鉄道を経営する事業体、および鉄道監督行政を所管する政府官庁の組織の変遷は次の通り。"
77 | },
78 | {
79 | "curid": "3510636",
80 | "text": "このように{{1|朴槿恵}}には{{1|崔}}の影が付きまとっていたことが、大統領就任後の{{8|崔順実ゲート事件}}に繋がった。"
81 | }
82 | ]
--------------------------------------------------------------------------------
/docs/static/js/script.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | Vue.component('annotation',{
4 | props: ['item'],
5 | data: function (){
6 | let data = {
7 | entity_type_name: ['人名','法人名','政治的組織名','その他組織名','地名','施設名','製品名','イベント名']
8 | };
9 | return data
10 | },
11 | computed: {
12 | marked_text: function () {
13 | let text_splitted = this.item.text.split(/{{(\d)\|(.*?)}}/);
14 | for (let entity_idx = 0; 3 * (entity_idx + 1) < text_splitted.length; entity_idx++) {
15 | let entity_type = text_splitted[3 * entity_idx + 1];
16 | let entity = text_splitted[3 * entity_idx + 2];
17 | text_splitted[3 * entity_idx + 1] = '';
18 | text_splitted[3 * entity_idx + 2] = `${entity} [${this.entity_type_name[parseInt(entity_type,10)-1]}] `;
19 | }
20 | return text_splitted.join('');
21 | }
22 | },
23 | template: ``
26 | });
27 |
28 | let app = new Vue({
29 | el: '#output',
30 | data: {
31 | items: sample
32 | },
33 | });
34 |
35 |
--------------------------------------------------------------------------------