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|
|
|
|
1 |
+
{
|
2 |
+
"cells": [
|
3 |
+
{
|
4 |
+
"cell_type": "code",
|
5 |
+
"execution_count": 5,
|
6 |
+
"metadata": {},
|
7 |
+
"outputs": [],
|
8 |
+
"source": [
|
9 |
+
"from topicnet.cooking_machine import Dataset\n",
|
10 |
+
"\n",
|
11 |
+
"\n",
|
12 |
+
"dataset = Dataset('../wikiextractor/good_ruwiki_vw.txt', batch_vectorizer_path=\"./ruwiki_batches\")\n"
|
13 |
+
]
|
14 |
+
},
|
15 |
+
{
|
16 |
+
"cell_type": "code",
|
17 |
+
"execution_count": 32,
|
18 |
+
"metadata": {},
|
19 |
+
"outputs": [],
|
20 |
+
"source": [
|
21 |
+
"from topicnet.cooking_machine.dataset import get_modality_vw\n",
|
22 |
+
"import pandas as pd\n",
|
23 |
+
"\n",
|
24 |
+
"data_categories = dataset._data.vw_text.apply(lambda s: get_modality_vw(s, \"@categories\"))"
|
25 |
+
]
|
26 |
+
},
|
27 |
+
{
|
28 |
+
"cell_type": "code",
|
29 |
+
"execution_count": 33,
|
30 |
+
"metadata": {},
|
31 |
+
"outputs": [],
|
32 |
+
"source": [
|
33 |
+
"\n",
|
34 |
+
"data = data_categories.apply(lambda x: [cat[:-2] for cat in x.split()])\n",
|
35 |
+
"data_categories = pd.DataFrame(data=data.values, index=data.index.rename(\"title\"), columns=[\"categories\"])"
|
36 |
+
]
|
37 |
+
},
|
38 |
+
{
|
39 |
+
"cell_type": "code",
|
40 |
+
"execution_count": 34,
|
41 |
+
"metadata": {},
|
42 |
+
"outputs": [
|
43 |
+
{
|
44 |
+
"data": {
|
45 |
+
"text/html": [
|
46 |
+
"<div>\n",
|
47 |
+
"<style scoped>\n",
|
48 |
+
" .dataframe tbody tr th:only-of-type {\n",
|
49 |
+
" vertical-align: middle;\n",
|
50 |
+
" }\n",
|
51 |
+
"\n",
|
52 |
+
" .dataframe tbody tr th {\n",
|
53 |
+
" vertical-align: top;\n",
|
54 |
+
" }\n",
|
55 |
+
"\n",
|
56 |
+
" .dataframe thead th {\n",
|
57 |
+
" text-align: right;\n",
|
58 |
+
" }\n",
|
59 |
+
"</style>\n",
|
60 |
+
"<table border=\"1\" class=\"dataframe\">\n",
|
61 |
+
" <thead>\n",
|
62 |
+
" <tr style=\"text-align: right;\">\n",
|
63 |
+
" <th></th>\n",
|
64 |
+
" <th>categories</th>\n",
|
65 |
+
" </tr>\n",
|
66 |
+
" <tr>\n",
|
67 |
+
" <th>title</th>\n",
|
68 |
+
" <th></th>\n",
|
69 |
+
" </tr>\n",
|
70 |
+
" </thead>\n",
|
71 |
+
" <tbody>\n",
|
72 |
+
" <tr>\n",
|
73 |
+
" <th>Санкт-Петербург</th>\n",
|
74 |
+
" <td>[Санкт-Петербург, Всемирное_наследие_в_России,...</td>\n",
|
75 |
+
" </tr>\n",
|
76 |
+
" <tr>\n",
|
77 |
+
" <th>Дворцовая_площадь</th>\n",
|
78 |
+
" <td>[Карл_Росси, Эрмитаж, Художественные_музеи_и_г...</td>\n",
|
79 |
+
" </tr>\n",
|
80 |
+
" <tr>\n",
|
81 |
+
" <th>Греко-персидские_войны</th>\n",
|
82 |
+
" <td>[Греко-персидские_войны, Войны_Древней_Греции,...</td>\n",
|
83 |
+
" </tr>\n",
|
84 |
+
" <tr>\n",
|
85 |
+
" <th>Тихий_океан</th>\n",
|
86 |
+
" <td>[Тихий_океан]</td>\n",
|
87 |
+
" </tr>\n",
|
88 |
+
" <tr>\n",
|
89 |
+
" <th>Атлантический_океан</th>\n",
|
90 |
+
" <td>[Атлантический_океан]</td>\n",
|
91 |
+
" </tr>\n",
|
92 |
+
" <tr>\n",
|
93 |
+
" <th>Нева</th>\n",
|
94 |
+
" <td>[Нева, Реки,_впадающие_в_Финский_залив, Реки_Л...</td>\n",
|
95 |
+
" </tr>\n",
|
96 |
+
" <tr>\n",
|
97 |
+
" <th>Тонкослойная_хроматография</th>\n",
|
98 |
+
" <td>[Хроматография]</td>\n",
|
99 |
+
" </tr>\n",
|
100 |
+
" <tr>\n",
|
101 |
+
" <th>Атомно-абсорбционная_спектрометрия</th>\n",
|
102 |
+
" <td>[Аналитическая_химия, Спектроскопия]</td>\n",
|
103 |
+
" </tr>\n",
|
104 |
+
" <tr>\n",
|
105 |
+
" <th>Протеомика</th>\n",
|
106 |
+
" <td>[Биоинформатика, Протеомика, Белки]</td>\n",
|
107 |
+
" </tr>\n",
|
108 |
+
" <tr>\n",
|
109 |
+
" <th>Вирус_иммунодефицита_человека</th>\n",
|
110 |
+
" <td>[Retroviridae, ВИЧ-инфекция]</td>\n",
|
111 |
+
" </tr>\n",
|
112 |
+
" <tr>\n",
|
113 |
+
" <th>Эпос_о_Гильгамеше</th>\n",
|
114 |
+
" <td>[Сказания_о_Гильгамеше, Эпические_произведения...</td>\n",
|
115 |
+
" </tr>\n",
|
116 |
+
" <tr>\n",
|
117 |
+
" <th>Русский_язык</th>\n",
|
118 |
+
" <td>[Русский_язык, Языки_России, Языки_Белоруссии]</td>\n",
|
119 |
+
" </tr>\n",
|
120 |
+
" <tr>\n",
|
121 |
+
" <th>Индуизм</th>\n",
|
122 |
+
" <td>[Индуизм, Религия_в_Азии, Индоиранские_религии]</td>\n",
|
123 |
+
" </tr>\n",
|
124 |
+
" <tr>\n",
|
125 |
+
" <th>Спирты</th>\n",
|
126 |
+
" <td>[Спирты]</td>\n",
|
127 |
+
" </tr>\n",
|
128 |
+
" <tr>\n",
|
129 |
+
" <th>Кикимора</th>\n",
|
130 |
+
" <td>[Персонажи_русской_мифологии, Мифические_сущес...</td>\n",
|
131 |
+
" </tr>\n",
|
132 |
+
" <tr>\n",
|
133 |
+
" <th>Леший</th>\n",
|
134 |
+
" <td>[Духи_леса, Духи_места_у_славян, Нечистая_сила...</td>\n",
|
135 |
+
" </tr>\n",
|
136 |
+
" <tr>\n",
|
137 |
+
" <th>Воронеж</th>\n",
|
138 |
+
" <td>[Воронеж, Города,_основанные_в_XVI_веке, Город...</td>\n",
|
139 |
+
" </tr>\n",
|
140 |
+
" <tr>\n",
|
141 |
+
" <th>Солнце</th>\n",
|
142 |
+
" <td>[Термоядерные_реакции, Солнце, Жёлтые_карлики]</td>\n",
|
143 |
+
" </tr>\n",
|
144 |
+
" <tr>\n",
|
145 |
+
" <th>Венера</th>\n",
|
146 |
+
" <td>[Венера, Небесные_тела,_посещённые_спускаемыми...</td>\n",
|
147 |
+
" </tr>\n",
|
148 |
+
" <tr>\n",
|
149 |
+
" <th>Юпитер</th>\n",
|
150 |
+
" <td>[Юпитер, Небесные_тела,_посещённые_спускаемыми...</td>\n",
|
151 |
+
" </tr>\n",
|
152 |
+
" <tr>\n",
|
153 |
+
" <th>NTP</th>\n",
|
154 |
+
" <td>[Протоколы_прикладного_уровня, Интернет-проток...</td>\n",
|
155 |
+
" </tr>\n",
|
156 |
+
" <tr>\n",
|
157 |
+
" <th>Чеченская_письменность</th>\n",
|
158 |
+
" <td>[Кириллические_алфавиты, Алфавиты_на_основе_ла...</td>\n",
|
159 |
+
" </tr>\n",
|
160 |
+
" <tr>\n",
|
161 |
+
" <th>Нижний_Новгород</th>\n",
|
162 |
+
" <td>[Нижний_Новгород, Населённые_пункты_городского...</td>\n",
|
163 |
+
" </tr>\n",
|
164 |
+
" <tr>\n",
|
165 |
+
" <th>Иванов,_Вячеслав_Иванович</th>\n",
|
166 |
+
" <td>[Выпускники_1-й_Московской_гимназии, Писатели_...</td>\n",
|
167 |
+
" </tr>\n",
|
168 |
+
" <tr>\n",
|
169 |
+
" <th>Лейбниц,_Готфрид_Вильгельм</th>\n",
|
170 |
+
" <td>[Члены_Прусской_академии_наук, Члены_Лондонско...</td>\n",
|
171 |
+
" </tr>\n",
|
172 |
+
" <tr>\n",
|
173 |
+
" <th>Гагарин,_Юрий_Алексеевич</th>\n",
|
174 |
+
" <td>[Юрий_Гагарин, Персоналии_Гагарин, Погибшие_в_...</td>\n",
|
175 |
+
" </tr>\n",
|
176 |
+
" <tr>\n",
|
177 |
+
" <th>Финский_залив</th>\n",
|
178 |
+
" <td>[Финский_залив, Заливы_Эстонии, Заливы_Ленингр...</td>\n",
|
179 |
+
" </tr>\n",
|
180 |
+
" <tr>\n",
|
181 |
+
" <th>Индонезия</th>\n",
|
182 |
+
" <td>[Индонезия]</td>\n",
|
183 |
+
" </tr>\n",
|
184 |
+
" <tr>\n",
|
185 |
+
" <th>Ботсвана</th>\n",
|
186 |
+
" <td>[Ботсвана]</td>\n",
|
187 |
+
" </tr>\n",
|
188 |
+
" <tr>\n",
|
189 |
+
" <th>Общая_теория_относительности</th>\n",
|
190 |
+
" <td>[Теории_Альберта_Эйнштейна, Общая_теория_относ...</td>\n",
|
191 |
+
" </tr>\n",
|
192 |
+
" <tr>\n",
|
193 |
+
" <th>...</th>\n",
|
194 |
+
" <td>...</td>\n",
|
195 |
+
" </tr>\n",
|
196 |
+
" <tr>\n",
|
197 |
+
" <th>Административно-территориальное_деление_Башкурдистана</th>\n",
|
198 |
+
" <td>[Административно-территориальное_деление_Башко...</td>\n",
|
199 |
+
" </tr>\n",
|
200 |
+
" <tr>\n",
|
201 |
+
" <th>Тёмный_американский_стриж</th>\n",
|
202 |
+
" <td>[Cypseloides, Животные,_описанные_в_1848_году,...</td>\n",
|
203 |
+
" </tr>\n",
|
204 |
+
" <tr>\n",
|
205 |
+
" <th>Убийство_Марты_дель_Кастильо</th>\n",
|
206 |
+
" <td>[Уголовные_дела_без_тела, Убийства_в_Испании, ...</td>\n",
|
207 |
+
" </tr>\n",
|
208 |
+
" <tr>\n",
|
209 |
+
" <th>Праздничное_шествие_с_песней._Коляда</th>\n",
|
210 |
+
" <td>[Художники-примитивисты, Художники_наивного_ис...</td>\n",
|
211 |
+
" </tr>\n",
|
212 |
+
" <tr>\n",
|
213 |
+
" <th>Манойлов,_Владимир_Евстафьевич</th>\n",
|
214 |
+
" <td>[Электротехники_СССР, Выпускники_Санкт-Петербу...</td>\n",
|
215 |
+
" </tr>\n",
|
216 |
+
" <tr>\n",
|
217 |
+
" <th>Невилл,_Джон,_3-й_барон_Невилл_из_Рэби</th>\n",
|
218 |
+
" <td>[Невиллы, Бароны_Невилл_из_Рэби, Кавалеры_орде...</td>\n",
|
219 |
+
" </tr>\n",
|
220 |
+
" <tr>\n",
|
221 |
+
" <th>Чаннер,_Джордж_Николас</th>\n",
|
222 |
+
" <td>[Генералы_Британской_Индийской_армии, Участник...</td>\n",
|
223 |
+
" </tr>\n",
|
224 |
+
" <tr>\n",
|
225 |
+
" <th>Сиффлит,_Леонард</th>\n",
|
226 |
+
" <td>[Солдаты_Армии_Австралии, Военнопленные_Австра...</td>\n",
|
227 |
+
" </tr>\n",
|
228 |
+
" <tr>\n",
|
229 |
+
" <th>Ньютон,_Уильям</th>\n",
|
230 |
+
" <td>[Гольфисты_Австралии, К��икетчики_Австралии, Иг...</td>\n",
|
231 |
+
" </tr>\n",
|
232 |
+
" <tr>\n",
|
233 |
+
" <th>Доганджи_Мехмед-паша</th>\n",
|
234 |
+
" <td>[История_Османской_империи, Фавориты_монархов]</td>\n",
|
235 |
+
" </tr>\n",
|
236 |
+
" <tr>\n",
|
237 |
+
" <th>Инцидент_с_бейлербеем</th>\n",
|
238 |
+
" <td>[История_Османской_империи, Восстания_в_Османс...</td>\n",
|
239 |
+
" </tr>\n",
|
240 |
+
" <tr>\n",
|
241 |
+
" <th>Касым-бей_Караманид</th>\n",
|
242 |
+
" <td>[Караманиды]</td>\n",
|
243 |
+
" </tr>\n",
|
244 |
+
" <tr>\n",
|
245 |
+
" <th>Miru_Tights</th>\n",
|
246 |
+
" <td>[Аниме_и_манга_о_школе]</td>\n",
|
247 |
+
" </tr>\n",
|
248 |
+
" <tr>\n",
|
249 |
+
" <th>Harrisonavis_croizeti</th>\n",
|
250 |
+
" <td>[Вымершие_фламингообразные, Монотипические_род...</td>\n",
|
251 |
+
" </tr>\n",
|
252 |
+
" <tr>\n",
|
253 |
+
" <th>Смерть_вождя</th>\n",
|
254 |
+
" <td>[Работы_Сергея_Меркурова, Лениниана, Иконограф...</td>\n",
|
255 |
+
" </tr>\n",
|
256 |
+
" <tr>\n",
|
257 |
+
" <th>Арест_принца_Дипонегоро_(картина_Салеха)</th>\n",
|
258 |
+
" <td>[Картины_из_собраний_музея_президентского_двор...</td>\n",
|
259 |
+
" </tr>\n",
|
260 |
+
" <tr>\n",
|
261 |
+
" <th>Византийский_город</th>\n",
|
262 |
+
" <td>[Население_Византии, Градостроительство_по_ист...</td>\n",
|
263 |
+
" </tr>\n",
|
264 |
+
" <tr>\n",
|
265 |
+
" <th>Шехзаде_Мустафа_(сын_Мехмеда_II)</th>\n",
|
266 |
+
" <td>[Династия_Османов, Военные_Османской_империи]</td>\n",
|
267 |
+
" </tr>\n",
|
268 |
+
" <tr>\n",
|
269 |
+
" <th>Резня_в_Благае</th>\n",
|
270 |
+
" <td>[Геноцид_сербов_(1941—1945)]</td>\n",
|
271 |
+
" </tr>\n",
|
272 |
+
" <tr>\n",
|
273 |
+
" <th>Пятнистолобый_американский_стриж</th>\n",
|
274 |
+
" <td>[Cypseloides, Животные,_описанные_в_1945_году]</td>\n",
|
275 |
+
" </tr>\n",
|
276 |
+
" <tr>\n",
|
277 |
+
" <th>Бассет,_Ричард</th>\n",
|
278 |
+
" <td>[Бассеты, Главные_шерифы_Лестершира]</td>\n",
|
279 |
+
" </tr>\n",
|
280 |
+
" <tr>\n",
|
281 |
+
" <th>Бикрофт,_Джон</th>\n",
|
282 |
+
" <td>[Исследователи_Африки, Путешественники_Великоб...</td>\n",
|
283 |
+
" </tr>\n",
|
284 |
+
" <tr>\n",
|
285 |
+
" <th>Эдмунд_Плантагенет,_2-й_граф_Корнуолл</th>\n",
|
286 |
+
" <td>[Плантагенеты, Графы_Корнуолл]</td>\n",
|
287 |
+
" </tr>\n",
|
288 |
+
" <tr>\n",
|
289 |
+
" <th>Королева_сердец</th>\n",
|
290 |
+
" <td>[Фильмы-драмы_Дании, Фильмы-драмы_Швеции, Филь...</td>\n",
|
291 |
+
" </tr>\n",
|
292 |
+
" <tr>\n",
|
293 |
+
" <th>Карабаев,_Мухамеджан_Карабаевич</th>\n",
|
294 |
+
" <td>[Статские_советники]</td>\n",
|
295 |
+
" </tr>\n",
|
296 |
+
" <tr>\n",
|
297 |
+
" <th>Бассет,_Филипп</th>\n",
|
298 |
+
" <td>[Бассеты]</td>\n",
|
299 |
+
" </tr>\n",
|
300 |
+
" <tr>\n",
|
301 |
+
" <th>Битва_при_Линкольне_(1217)</th>\n",
|
302 |
+
" <td>[Сражения_Первой_баронской_войны, 1217_год, Ли...</td>\n",
|
303 |
+
" </tr>\n",
|
304 |
+
" <tr>\n",
|
305 |
+
" <th>Лю_Жэньхан</th>\n",
|
306 |
+
" <td>[Философы_эпохи_Цин, Социалисты_Китая, Социали...</td>\n",
|
307 |
+
" </tr>\n",
|
308 |
+
" <tr>\n",
|
309 |
+
" <th>Реформа_эталонных_процентных_ставок</th>\n",
|
310 |
+
" <td>[Процентные_ставки, Экономические_показатели, ...</td>\n",
|
311 |
+
" </tr>\n",
|
312 |
+
" <tr>\n",
|
313 |
+
" <th>Ментеше-бей</th>\n",
|
314 |
+
" <td>[Турецкие_династии]</td>\n",
|
315 |
+
" </tr>\n",
|
316 |
+
" </tbody>\n",
|
317 |
+
"</table>\n",
|
318 |
+
"<p>8603 rows × 1 columns</p>\n",
|
319 |
+
"</div>"
|
320 |
+
],
|
321 |
+
"text/plain": [
|
322 |
+
" categories\n",
|
323 |
+
"title \n",
|
324 |
+
"Санкт-Петербург [Санкт-Петербург, Всемирное_наследие_в_России,...\n",
|
325 |
+
"Дворцовая_площадь [Карл_Росси, Эрмитаж, Художественные_музеи_и_г...\n",
|
326 |
+
"Греко-персидские_войны [Греко-персидские_войны, Войны_Древней_Греции,...\n",
|
327 |
+
"Тихий_океан [Тихий_океан]\n",
|
328 |
+
"Атлантический_океан [Атлантический_океан]\n",
|
329 |
+
"Нева [Нева, Реки,_впадающие_в_Финский_залив, Реки_Л...\n",
|
330 |
+
"Тонкослойная_хроматография [Хроматография]\n",
|
331 |
+
"Атомно-абсорбционная_спектрометрия [Аналитическая_химия, Спектроскопия]\n",
|
332 |
+
"Протеомика [Биоинформатика, Протеомика, Белки]\n",
|
333 |
+
"Вирус_иммунодефицита_человека [Retroviridae, ВИЧ-инфекция]\n",
|
334 |
+
"Эпос_о_Гильгамеше [Сказания_о_Гильгамеше, Эпические_произведения...\n",
|
335 |
+
"Русский_язык [Русский_язык, Языки_России, Языки_Белоруссии]\n",
|
336 |
+
"Индуизм [Индуизм, Религия_в_Азии, Индоиранские_религии]\n",
|
337 |
+
"Спирты [Спирты]\n",
|
338 |
+
"Кикимора [Персонажи_русской_мифологии, Мифические_сущес...\n",
|
339 |
+
"Леший [Духи_леса, Духи_места_у_славян, Нечистая_сила...\n",
|
340 |
+
"Воронеж [Воронеж, Города,_основанные_в_XVI_веке, Город...\n",
|
341 |
+
"Солнце [Термоядерные_реакции, Солнце, Жёлтые_карлики]\n",
|
342 |
+
"Венера [Венера, Небесные_тела,_посещённые_спускаемыми...\n",
|
343 |
+
"Юпитер [Юпитер, Небесные_тела,_посещённые_спускаемыми...\n",
|
344 |
+
"NTP [Протоколы_прикладного_уровня, Интернет-проток...\n",
|
345 |
+
"Чеченская_письменность [Кириллические_алфавиты, Алфавиты_на_основе_ла...\n",
|
346 |
+
"Нижний_Новгород [Нижний_Новгород, Населённые_пункты_городского...\n",
|
347 |
+
"Иванов,_Вячеслав_Иванович [Выпускники_1-й_Московской_гимназии, Писатели_...\n",
|
348 |
+
"Лейбниц,_Готфрид_Вильгельм [Члены_Прусской_академии_наук, Члены_Лондонско...\n",
|
349 |
+
"Гагарин,_Юрий_Алексеевич [Юрий_Гагарин, Персоналии_Гагарин, Погибшие_в_...\n",
|
350 |
+
"Финский_залив [Финский_залив, Заливы_Эстонии, Заливы_Ленингр...\n",
|
351 |
+
"Индонезия [Индонезия]\n",
|
352 |
+
"Ботсвана [Ботсвана]\n",
|
353 |
+
"Общая_теория_относительности [Теории_Альберта_Эйнштейна, Общая_теория_относ...\n",
|
354 |
+
"... ...\n",
|
355 |
+
"Административно-территориальное_деление_Башкурд... [Административно-территориальное_деление_Башко...\n",
|
356 |
+
"Тёмный_американский_стриж [Cypseloides, Животные,_описанные_в_1848_году,...\n",
|
357 |
+
"Убийство_Марты_дель_Кастильо [Уголовные_дела_без_тела, ��бийства_в_Испании, ...\n",
|
358 |
+
"Праздничное_шествие_с_песней._Коляда [Художники-примитивисты, Художники_наивного_ис...\n",
|
359 |
+
"Манойлов,_Владимир_Евстафьевич [Электротехники_СССР, Выпускники_Санкт-Петербу...\n",
|
360 |
+
"Невилл,_Джон,_3-й_барон_Невилл_из_Рэби [Невиллы, Бароны_Невилл_из_Рэби, Кавалеры_орде...\n",
|
361 |
+
"Чаннер,_Джордж_Николас [Генералы_Британской_Индийской_армии, Участник...\n",
|
362 |
+
"Сиффлит,_Леонард [Солдаты_Армии_Австралии, Военнопленные_Австра...\n",
|
363 |
+
"Ньютон,_Уильям [Гольфисты_Австралии, Крикетчики_Австралии, Иг...\n",
|
364 |
+
"Доганджи_Мехмед-паша [История_Османской_империи, Фавориты_монархов]\n",
|
365 |
+
"Инцидент_с_бейлербеем [История_Османской_империи, Восстания_в_Османс...\n",
|
366 |
+
"Касым-бей_Караманид [Караманиды]\n",
|
367 |
+
"Miru_Tights [Аниме_и_манга_о_школе]\n",
|
368 |
+
"Harrisonavis_croizeti [Вымершие_фламингообразные, Монотипические_род...\n",
|
369 |
+
"Смерть_вождя [Работы_Сергея_Меркурова, Лениниана, Иконограф...\n",
|
370 |
+
"Арест_принца_Дипонегоро_(картина_Салеха) [Картины_из_собраний_музея_президентского_двор...\n",
|
371 |
+
"Византийский_город [Население_Византии, Градостроительство_по_ист...\n",
|
372 |
+
"Шехзаде_Мустафа_(сын_Мехмеда_II) [Династия_Османов, Военные_Османской_империи]\n",
|
373 |
+
"Резня_в_Благае [Геноцид_сербов_(1941—1945)]\n",
|
374 |
+
"Пятнистолобый_американский_стриж [Cypseloides, Животные,_описанные_в_1945_году]\n",
|
375 |
+
"Бассет,_Ричард [Бассеты, Главные_шерифы_Лестершира]\n",
|
376 |
+
"Бикрофт,_Джон [Исследователи_Африки, Путешественники_Великоб...\n",
|
377 |
+
"Эдмунд_Плантагенет,_2-й_граф_Корнуолл [Плантагенеты, Графы_Корнуолл]\n",
|
378 |
+
"Королева_сердец [Фильмы-драмы_Дании, Фильмы-драмы_Швеции, Филь...\n",
|
379 |
+
"Карабаев,_Мухамеджан_Карабаевич [Статские_советники]\n",
|
380 |
+
"Бассет,_Филипп [Бассеты]\n",
|
381 |
+
"Битва_при_Линкольне_(1217) [Сражения_Первой_баронской_войны, 1217_год, Ли...\n",
|
382 |
+
"Лю_Жэньхан [Философы_эпохи_Цин, Социалисты_Китая, Социали...\n",
|
383 |
+
"Реформа_эталонных_процентных_ставок [Процентные_ставки, Экономические_показатели, ...\n",
|
384 |
+
"Ментеше-бей [Турецкие_династии]\n",
|
385 |
+
"\n",
|
386 |
+
"[8603 rows x 1 columns]"
|
387 |
+
]
|
388 |
+
},
|
389 |
+
"execution_count": 34,
|
390 |
+
"metadata": {},
|
391 |
+
"output_type": "execute_result"
|
392 |
+
}
|
393 |
+
],
|
394 |
+
"source": [
|
395 |
+
"data_categories"
|
396 |
+
]
|
397 |
+
},
|
398 |
+
{
|
399 |
+
"cell_type": "code",
|
400 |
+
"execution_count": null,
|
401 |
+
"metadata": {},
|
402 |
+
"outputs": [],
|
403 |
+
"source": []
|
404 |
+
},
|
405 |
+
{
|
406 |
+
"cell_type": "code",
|
407 |
+
"execution_count": 85,
|
408 |
+
"metadata": {},
|
409 |
+
"outputs": [],
|
410 |
+
"source": [
|
411 |
+
"\n",
|
412 |
+
"import numpy as np\n",
|
413 |
+
"\n",
|
414 |
+
"THRESHOLD = 0\n",
|
415 |
+
"\n",
|
416 |
+
"def randomly_select(data_orig, point_a, should_intersect):\n",
|
417 |
+
" attempts_left = 100\n",
|
418 |
+
" while attempts_left > 0:\n",
|
419 |
+
" rnd_idx_b = np.random.choice(data_orig.shape[0])\n",
|
420 |
+
" point_b = data_orig.iloc[rnd_idx_b]\n",
|
421 |
+
" intersection = set(point_b.categories) & set(point_a.categories)\n",
|
422 |
+
" is_big = (len(intersection) > THRESHOLD)\n",
|
423 |
+
" if should_intersect == is_big:\n",
|
424 |
+
" # if is_big:\n",
|
425 |
+
" # print(point_a.title, point_b.title, intersection)\n",
|
426 |
+
" return point_b.title, rnd_idx_b, intersection\n",
|
427 |
+
" attempts_left -= 1\n",
|
428 |
+
" return None, None, None\n",
|
429 |
+
"\n",
|
430 |
+
"def generate_triplet(data_orig):\n",
|
431 |
+
"\n",
|
432 |
+
" rnd_idx_a = np.random.choice(data_orig.shape[0])\n",
|
433 |
+
" point_a = data_orig.iloc[rnd_idx_a]\n",
|
434 |
+
" point_b, rnd_idx_b, intersection = randomly_select(data_orig, point_a, should_intersect=True)\n",
|
435 |
+
" point_c, rnd_idx_c, empty_intersection = randomly_select(data_orig, point_a, should_intersect=False)\n",
|
436 |
+
" # return [point_a, point_b, point_c]\n",
|
437 |
+
" return [point_a.title, point_b, point_c, intersection]\n",
|
438 |
+
" # return [rnd_idx_a, rnd_idx_b, rnd_idx_c]\n",
|
439 |
+
"\n",
|
440 |
+
" \n",
|
441 |
+
" "
|
442 |
+
]
|
443 |
+
},
|
444 |
+
{
|
445 |
+
"cell_type": "code",
|
446 |
+
"execution_count": 91,
|
447 |
+
"metadata": {},
|
448 |
+
"outputs": [
|
449 |
+
{
|
450 |
+
"name": "stderr",
|
451 |
+
"output_type": "stream",
|
452 |
+
"text": [
|
453 |
+
"100%|██████████| 10000/10000 [01:57<00:00, 85.28it/s]\n"
|
454 |
+
]
|
455 |
+
},
|
456 |
+
{
|
457 |
+
"data": {
|
458 |
+
"text/plain": [
|
459 |
+
"2094"
|
460 |
+
]
|
461 |
+
},
|
462 |
+
"execution_count": 91,
|
463 |
+
"metadata": {},
|
464 |
+
"output_type": "execute_result"
|
465 |
+
}
|
466 |
+
],
|
467 |
+
"source": [
|
468 |
+
"from tqdm import tqdm\n",
|
469 |
+
"\n",
|
470 |
+
"triplets = []\n",
|
471 |
+
"\n",
|
472 |
+
"for i in tqdm(range(10000)):\n",
|
473 |
+
" a, b, c, explanation = generate_triplet(data_categories.reset_index())\n",
|
474 |
+
" if b is not None and c is not None:\n",
|
475 |
+
" triplets.append( (a, b, c, explanation) )\n",
|
476 |
+
"\n",
|
477 |
+
"len(triplets)"
|
478 |
+
]
|
479 |
+
},
|
480 |
+
{
|
481 |
+
"cell_type": "code",
|
482 |
+
"execution_count": null,
|
483 |
+
"metadata": {},
|
484 |
+
"outputs": [],
|
485 |
+
"source": []
|
486 |
+
},
|
487 |
+
{
|
488 |
+
"cell_type": "code",
|
489 |
+
"execution_count": 93,
|
490 |
+
"metadata": {},
|
491 |
+
"outputs": [],
|
492 |
+
"source": [
|
493 |
+
"import pickle\n",
|
494 |
+
"\n",
|
495 |
+
"with open(\"triplets_ruwiki_good.p\", \"wb\") as f:\n",
|
496 |
+
" pickle.dump(triplets, f)\n"
|
497 |
+
]
|
498 |
+
},
|
499 |
+
{
|
500 |
+
"cell_type": "code",
|
501 |
+
"execution_count": null,
|
502 |
+
"metadata": {},
|
503 |
+
"outputs": [],
|
504 |
+
"source": []
|
505 |
+
},
|
506 |
+
{
|
507 |
+
"cell_type": "code",
|
508 |
+
"execution_count": 96,
|
509 |
+
"metadata": {},
|
510 |
+
"outputs": [
|
511 |
+
{
|
512 |
+
"data": {
|
513 |
+
"text/plain": [
|
514 |
+
"{'@categories', '@lemmatized', '@ngramms'}"
|
515 |
+
]
|
516 |
+
},
|
517 |
+
"execution_count": 96,
|
518 |
+
"metadata": {},
|
519 |
+
"output_type": "execute_result"
|
520 |
+
}
|
521 |
+
],
|
522 |
+
"source": [
|
523 |
+
"dataset.get_possible_modalities()"
|
524 |
+
]
|
525 |
+
},
|
526 |
+
{
|
527 |
+
"cell_type": "markdown",
|
528 |
+
"metadata": {},
|
529 |
+
"source": [
|
530 |
+
"## Scoring model by ranking quality"
|
531 |
+
]
|
532 |
+
},
|
533 |
+
{
|
534 |
+
"cell_type": "code",
|
535 |
+
"execution_count": 111,
|
536 |
+
"metadata": {},
|
537 |
+
"outputs": [],
|
538 |
+
"source": [
|
539 |
+
"from topicnet.cooking_machine.models import BaseScore as BaseTopicNetScore, TopicModel\n",
|
540 |
+
"\n",
|
541 |
+
"\n",
|
542 |
+
"class ValidationRankingQuality(BaseTopicNetScore):\n",
|
543 |
+
" def __init__(self, validation_dataset, triplets):\n",
|
544 |
+
" super().__init__()\n",
|
545 |
+
"\n",
|
546 |
+
" self.validation_dataset = validation_dataset\n",
|
547 |
+
" self.triplets = triplets\n",
|
548 |
+
"\n",
|
549 |
+
" def call(self, model: TopicModel):\n",
|
550 |
+
" theta = model.get_theta(dataset=self.validation_dataset)\n",
|
551 |
+
" \n",
|
552 |
+
" correct_rankings = 0\n",
|
553 |
+
"\n",
|
554 |
+
" for (a, b, c, _) in self.triplets:\n",
|
555 |
+
" # L1 distance, just for example\n",
|
556 |
+
" similar_dist = sum(abs(theta[a] - theta[b]))\n",
|
557 |
+
" diffrnt_dist = sum(abs(theta[a] - theta[c]))\n",
|
558 |
+
"\n",
|
559 |
+
" correct_rankings += (similar_dist < diffrnt_dist)\n",
|
560 |
+
"\n",
|
561 |
+
" return correct_rankings / len(self.triplets)\n",
|
562 |
+
"\n",
|
563 |
+
" "
|
564 |
+
]
|
565 |
+
},
|
566 |
+
{
|
567 |
+
"cell_type": "code",
|
568 |
+
"execution_count": 112,
|
569 |
+
"metadata": {},
|
570 |
+
"outputs": [],
|
571 |
+
"source": [
|
572 |
+
"import artm\n",
|
573 |
+
"\n",
|
574 |
+
"artm_model = artm.ARTM(\n",
|
575 |
+
" num_topics=20, \n",
|
576 |
+
" dictionary=dataset.get_dictionary(),\n",
|
577 |
+
" class_ids={'@lemmatized': 1, '@ngramms': 50}, # absolute values, just for example\n",
|
578 |
+
" theta_columns_naming=\"title\"\n",
|
579 |
+
")\n",
|
580 |
+
"\n"
|
581 |
+
]
|
582 |
+
},
|
583 |
+
{
|
584 |
+
"cell_type": "code",
|
585 |
+
"execution_count": 113,
|
586 |
+
"metadata": {},
|
587 |
+
"outputs": [],
|
588 |
+
"source": [
|
589 |
+
"tm = TopicModel(artm_model, custom_scores={\"ranking\": ValidationRankingQuality(dataset, triplets)})"
|
590 |
+
]
|
591 |
+
},
|
592 |
+
{
|
593 |
+
"cell_type": "code",
|
594 |
+
"execution_count": 116,
|
595 |
+
"metadata": {
|
596 |
+
"scrolled": true
|
597 |
+
},
|
598 |
+
"outputs": [],
|
599 |
+
"source": [
|
600 |
+
"tm._fit(dataset.get_batch_vectorizer(), 10)"
|
601 |
+
]
|
602 |
+
},
|
603 |
+
{
|
604 |
+
"cell_type": "code",
|
605 |
+
"execution_count": 119,
|
606 |
+
"metadata": {},
|
607 |
+
"outputs": [
|
608 |
+
{
|
609 |
+
"name": "stdout",
|
610 |
+
"output_type": "stream",
|
611 |
+
"text": [
|
612 |
+
"0.8911174785100286\n"
|
613 |
+
]
|
614 |
+
},
|
615 |
+
{
|
616 |
+
"data": {
|
617 |
+
"text/plain": [
|
618 |
+
"[<matplotlib.lines.Line2D at 0x7f4f69b56b00>]"
|
619 |
+
]
|
620 |
+
},
|
621 |
+
"execution_count": 119,
|
622 |
+
"metadata": {},
|
623 |
+
"output_type": "execute_result"
|
624 |
+
},
|
625 |
+
{
|
626 |
+
"data": {
|
627 |
+
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAD6CAYAAACvZ4z8AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAds0lEQVR4nO3de3SV9Z3v8fc395ALBJJwC5dwE7BW0YgIotaqRTut7fRywEu1irZdo6d12jXLOj0zXbbOzJmZM3XWOrZnBKmtVqnH3pjK1OqpThEBCYo6QIEQbiEICbckQMhlf88feyduYoA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y9HfglMDvgmpIuLEG/FphsZpVmlkP0zZRlAdcUGDMzonOwm9z9X4KuJ0ju/m13r3D38UR/Lv7g7qE7Y0uUu78P7DazC2KbPg5sDLCkoO0CZpnZoNjvzccJ4ZvTWUEXkAzu3mFm9wMvEX3XfIm7bwi4rCDNAe4A3jOz9bFtD7v78gBrktTxAPCz2ElRLfDlgOsJjLuvMbMXgLeIXq32NiG8HYJugSAiEnJhmboREZFTUNCLiIScgl5EJOQU9CIiIaegFxEJOQW9iEjIKehFRELu/wNK4GTt3JDy7wAAAABJRU5ErkJggg==\n",
|
628 |
+
"text/plain": [
|
629 |
+
"<Figure size 432x288 with 1 Axes>"
|
630 |
+
]
|
631 |
+
},
|
632 |
+
"metadata": {
|
633 |
+
"needs_background": "light"
|
634 |
+
},
|
635 |
+
"output_type": "display_data"
|
636 |
+
}
|
637 |
+
],
|
638 |
+
"source": [
|
639 |
+
"import matplotlib.pyplot as plt\n",
|
640 |
+
"%matplotlib inline\n",
|
641 |
+
"\n",
|
642 |
+
"print(tm.scores['ranking'][-1])\n",
|
643 |
+
"plt.plot(tm.scores['ranking'])"
|
644 |
+
]
|
645 |
+
},
|
646 |
+
{
|
647 |
+
"cell_type": "code",
|
648 |
+
"execution_count": null,
|
649 |
+
"metadata": {},
|
650 |
+
"outputs": [],
|
651 |
+
"source": []
|
652 |
+
},
|
653 |
+
{
|
654 |
+
"cell_type": "code",
|
655 |
+
"execution_count": 120,
|
656 |
+
"metadata": {},
|
657 |
+
"outputs": [],
|
658 |
+
"source": [
|
659 |
+
"theta = artm_model.transform(batch_vectorizer=dataset.get_batch_vectorizer())"
|
660 |
+
]
|
661 |
+
},
|
662 |
+
{
|
663 |
+
"cell_type": "code",
|
664 |
+
"execution_count": 121,
|
665 |
+
"metadata": {},
|
666 |
+
"outputs": [
|
667 |
+
{
|
668 |
+
"name": "stdout",
|
669 |
+
"output_type": "stream",
|
670 |
+
"text": [
|
671 |
+
"Далматинский_язык Сербские_беженцы_во_время_распада_Югославии Воротынское_княжество\n",
|
672 |
+
"{'История_Хорватии'}\n",
|
673 |
+
"Уорди,_Джеймс Конвей,_Джон_Хортон Великая_красота\n",
|
674 |
+
"{'Выпускники_Кембриджского_университета'}\n",
|
675 |
+
"Ардзинба,_Владислав_Григорьевич Шиман,_Пауль Беспощадная_толерантность\n",
|
676 |
+
"{'Политики_XX_века'}\n",
|
677 |
+
"Большеносая_акула Лисьи_акулы Тхить_Куанг_Дык\n",
|
678 |
+
"{'Рыбы_Атлантического_океана', 'Рыбы_Индийского_океана', 'Рыбы_Тихого_океана'}\n",
|
679 |
+
"Форт_Аламо_(фильм,_1960) Спи,_моя_любовь Государственные_деятели_Первой_мировой_войны\n",
|
680 |
+
"{'Фильмы_на_английском_языке'}\n",
|
681 |
+
"Лютостанский,_Ипполит_Иосифович Филипп_II_(митрополит_Московский) Тит_Квинкций_Фламинин\n",
|
682 |
+
"{'Извергнутые_из_сана'}\n",
|
683 |
+
"Махмуд-паша Марк_Порций_Катон_Салониан_Младший Сверх-Борджиа_в_Кремле\n",
|
684 |
+
"{'Персоналии_по_алфавиту'}\n",
|
685 |
+
"Чернов,_Григорий_Иванович Каспаров,_Гарри_Кимович Корабли_измерительного_комплекса_проекта_1914\n",
|
686 |
+
"{'Члены_КПСС'}\n",
|
687 |
+
"Махмуд-паша Александрян,_Рафаэль_Арамович Сикст_из_Оттерсдорфа\n",
|
688 |
+
"{'Персоналии_по_алфавиту'}\n",
|
689 |
+
"Операция_«Юго-Восточная_Хорватия» Штурм_Мервильской_батареи Chungking_Mansions\n",
|
690 |
+
"{'Сражения_Германии'}\n",
|
691 |
+
"Cult_County Sonic_Adventure_2 Клуб_Винкс_Волшебное_приключение\n",
|
692 |
+
"{'Компьютерные_игры,_разработанные_в_США', 'Игры_для_Windows'}\n"
|
693 |
+
]
|
694 |
+
}
|
695 |
+
],
|
696 |
+
"source": [
|
697 |
+
"for (a, b, c, explanation) in triplets[:100]:\n",
|
698 |
+
" # L1 distance, just for example\n",
|
699 |
+
" similar_dist = sum(abs(theta[a] - theta[b])) \n",
|
700 |
+
" diffrnt_dist = sum(abs(theta[a] - theta[c]))\n",
|
701 |
+
"\n",
|
702 |
+
" if (similar_dist > diffrnt_dist):\n",
|
703 |
+
" print(a, b, c)\n",
|
704 |
+
" print(explanation)\n"
|
705 |
+
]
|
706 |
+
},
|
707 |
+
{
|
708 |
+
"cell_type": "code",
|
709 |
+
"execution_count": null,
|
710 |
+
"metadata": {},
|
711 |
+
"outputs": [],
|
712 |
+
"source": []
|
713 |
+
},
|
714 |
+
{
|
715 |
+
"cell_type": "code",
|
716 |
+
"execution_count": null,
|
717 |
+
"metadata": {},
|
718 |
+
"outputs": [],
|
719 |
+
"source": []
|
720 |
+
}
|
721 |
+
],
|
722 |
+
"metadata": {
|
723 |
+
"kernelspec": {
|
724 |
+
"display_name": "Python 3",
|
725 |
+
"language": "python",
|
726 |
+
"name": "python3"
|
727 |
+
},
|
728 |
+
"language_info": {
|
729 |
+
"codemirror_mode": {
|
730 |
+
"name": "ipython",
|
731 |
+
"version": 3
|
732 |
+
},
|
733 |
+
"file_extension": ".py",
|
734 |
+
"mimetype": "text/x-python",
|
735 |
+
"name": "python",
|
736 |
+
"nbconvert_exporter": "python",
|
737 |
+
"pygments_lexer": "ipython3",
|
738 |
+
"version": "3.8.11"
|
739 |
+
}
|
740 |
+
},
|
741 |
+
"nbformat": 4,
|
742 |
+
"nbformat_minor": 2
|
743 |
+
}
|
preprocessing/RuWiki-preprocessing.ipynb
ADDED
The diff for this file is too large to render.
See raw diff
|
|
preprocessing/extract.sh
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
python WikiExtractor.py \
|
3 |
+
-b 200M --json --no_templates --filter_disambig_pages \
|
4 |
+
--json --output extracted_json_good \
|
5 |
+
--filter_category goodfilter \
|
6 |
+
--extract_categories --category_surface Категория \
|
7 |
+
data/ruwiki-20200301-pages-articles-multistream.xml.bz2
|
8 |
+
|