AngelPanizo commited on
Commit
2c74383
·
verified ·
1 Parent(s): e3c2dd1

Add BERTopic model

Browse files
README.md ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ---
3
+ tags:
4
+ - bertopic
5
+ library_name: bertopic
6
+ pipeline_tag: text-classification
7
+ ---
8
+
9
+ # MARTINI_enrich_BERTopic_CACUKsupport
10
+
11
+ This is a [BERTopic](https://github.com/MaartenGr/BERTopic) model.
12
+ BERTopic is a flexible and modular topic modeling framework that allows for the generation of easily interpretable topics from large datasets.
13
+
14
+ ## Usage
15
+
16
+ To use this model, please install BERTopic:
17
+
18
+ ```
19
+ pip install -U bertopic
20
+ ```
21
+
22
+ You can use the model as follows:
23
+
24
+ ```python
25
+ from bertopic import BERTopic
26
+ topic_model = BERTopic.load("AIDA-UPM/MARTINI_enrich_BERTopic_CACUKsupport")
27
+
28
+ topic_model.get_topic_info()
29
+ ```
30
+
31
+ ## Topic overview
32
+
33
+ * Number of topics: 5
34
+ * Number of training documents: 322
35
+
36
+ <details>
37
+ <summary>Click here for an overview of all topics.</summary>
38
+
39
+ | Topic ID | Topic Keywords | Topic Frequency | Label |
40
+ |----------|----------------|-----------------|-------|
41
+ | -1 | pandemic - rights - nhs - mandates - cannot | 22 | -1_pandemic_rights_nhs_mandates |
42
+ | 0 | buddhahood - affirmations - zoom - chant - kyo | 202 | 0_buddhahood_affirmations_zoom_chant |
43
+ | 1 | vaccines - misinformation - mandates - spreading - mask | 39 | 1_vaccines_misinformation_mandates_spreading |
44
+ | 2 | tapintofreedom - cacuksupport - webinar - 2022 - call | 31 | 2_tapintofreedom_cacuksupport_webinar_2022 |
45
+ | 3 | vaccination - saveourrightsuk - mandatory - employers - exempt | 28 | 3_vaccination_saveourrightsuk_mandatory_employers |
46
+
47
+ </details>
48
+
49
+ ## Training hyperparameters
50
+
51
+ * calculate_probabilities: True
52
+ * language: None
53
+ * low_memory: False
54
+ * min_topic_size: 10
55
+ * n_gram_range: (1, 1)
56
+ * nr_topics: None
57
+ * seed_topic_list: None
58
+ * top_n_words: 10
59
+ * verbose: False
60
+ * zeroshot_min_similarity: 0.7
61
+ * zeroshot_topic_list: None
62
+
63
+ ## Framework versions
64
+
65
+ * Numpy: 1.26.4
66
+ * HDBSCAN: 0.8.40
67
+ * UMAP: 0.5.7
68
+ * Pandas: 2.2.3
69
+ * Scikit-Learn: 1.5.2
70
+ * Sentence-transformers: 3.3.1
71
+ * Transformers: 4.46.3
72
+ * Numba: 0.60.0
73
+ * Plotly: 5.24.1
74
+ * Python: 3.10.12
config.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "calculate_probabilities": true,
3
+ "language": null,
4
+ "low_memory": false,
5
+ "min_topic_size": 10,
6
+ "n_gram_range": [
7
+ 1,
8
+ 1
9
+ ],
10
+ "nr_topics": null,
11
+ "seed_topic_list": null,
12
+ "top_n_words": 10,
13
+ "verbose": false,
14
+ "zeroshot_min_similarity": 0.7,
15
+ "zeroshot_topic_list": null
16
+ }
ctfidf.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:215755798c8185e284447f009b321575433c66074430990d44bb8b4bec7bdf8c
3
+ size 116392
ctfidf_config.json ADDED
The diff for this file is too large to render. See raw diff
 
topic_embeddings.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:35b636767561cf9aab5c93fb4945ef58a8136a42c45b54b8db0703d6f925599e
3
+ size 20568
topics.json ADDED
@@ -0,0 +1,482 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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],
12
+ [
13
+ "nhs",
14
+ 0.5173158645629883
15
+ ],
16
+ [
17
+ "mandates",
18
+ 0.5151352882385254
19
+ ],
20
+ [
21
+ "cannot",
22
+ 0.46023622155189514
23
+ ]
24
+ ],
25
+ "0": [
26
+ [
27
+ "buddhahood",
28
+ 0.520936906337738
29
+ ],
30
+ [
31
+ "affirmations",
32
+ 0.46484145522117615
33
+ ],
34
+ [
35
+ "zoom",
36
+ 0.4553733468055725
37
+ ],
38
+ [
39
+ "chant",
40
+ 0.45360738039016724
41
+ ],
42
+ [
43
+ "kyo",
44
+ 0.43598878383636475
45
+ ]
46
+ ],
47
+ "1": [
48
+ [
49
+ "vaccines",
50
+ 0.6139119863510132
51
+ ],
52
+ [
53
+ "misinformation",
54
+ 0.5341782569885254
55
+ ],
56
+ [
57
+ "mandates",
58
+ 0.48899129033088684
59
+ ],
60
+ [
61
+ "spreading",
62
+ 0.48726773262023926
63
+ ],
64
+ [
65
+ "mask",
66
+ 0.48683416843414307
67
+ ]
68
+ ],
69
+ "2": [
70
+ [
71
+ "tapintofreedom",
72
+ 0.5322668552398682
73
+ ],
74
+ [
75
+ "cacuksupport",
76
+ 0.48323822021484375
77
+ ],
78
+ [
79
+ "webinar",
80
+ 0.4685057997703552
81
+ ],
82
+ [
83
+ "2022",
84
+ 0.4282223880290985
85
+ ],
86
+ [
87
+ "call",
88
+ 0.413186252117157
89
+ ]
90
+ ],
91
+ "3": [
92
+ [
93
+ "vaccination",
94
+ 0.5704164505004883
95
+ ],
96
+ [
97
+ "saveourrightsuk",
98
+ 0.541172206401825
99
+ ],
100
+ [
101
+ "mandatory",
102
+ 0.4854751229286194
103
+ ],
104
+ [
105
+ "employers",
106
+ 0.4746055006980896
107
+ ],
108
+ [
109
+ "exempt",
110
+ 0.4465721845626831
111
+ ]
112
+ ]
113
+ },
114
+ "topics": [
115
+ 1,
116
+ -1,
117
+ 1,
118
+ -1,
119
+ -1,
120
+ -1,
121
+ -1,
122
+ -1,
123
+ -1,
124
+ -1,
125
+ -1,
126
+ -1,
127
+ -1,
128
+ -1,
129
+ -1,
130
+ -1,
131
+ -1,
132
+ -1,
133
+ -1,
134
+ -1,
135
+ -1,
136
+ 2,
137
+ -1,
138
+ 0,
139
+ -1,
140
+ 1,
141
+ 2,
142
+ -1,
143
+ 2,
144
+ 2,
145
+ 0,
146
+ -1,
147
+ -1,
148
+ -1,
149
+ -1,
150
+ -1,
151
+ -1,
152
+ -1,
153
+ -1,
154
+ 1,
155
+ -1,
156
+ 1,
157
+ 2,
158
+ 2,
159
+ 0,
160
+ -1,
161
+ 2,
162
+ -1,
163
+ -1,
164
+ -1,
165
+ -1,
166
+ -1,
167
+ 0,
168
+ -1,
169
+ -1,
170
+ -1,
171
+ -1,
172
+ -1,
173
+ -1,
174
+ -1,
175
+ -1,
176
+ 2,
177
+ 1,
178
+ 1,
179
+ -1,
180
+ -1,
181
+ -1,
182
+ 0,
183
+ -1,
184
+ -1,
185
+ -1,
186
+ -1,
187
+ -1,
188
+ -1,
189
+ 2,
190
+ 1,
191
+ 3,
192
+ 3,
193
+ -1,
194
+ -1,
195
+ -1,
196
+ 3,
197
+ 2,
198
+ -1,
199
+ 2,
200
+ -1,
201
+ -1,
202
+ 3,
203
+ -1,
204
+ -1,
205
+ -1,
206
+ -1,
207
+ -1,
208
+ 0,
209
+ -1,
210
+ 1,
211
+ -1,
212
+ 1,
213
+ -1,
214
+ -1,
215
+ 2,
216
+ -1,
217
+ 2,
218
+ -1,
219
+ -1,
220
+ 0,
221
+ 0,
222
+ -1,
223
+ -1,
224
+ 1,
225
+ -1,
226
+ 2,
227
+ 2,
228
+ -1,
229
+ -1,
230
+ -1,
231
+ 3,
232
+ -1,
233
+ 0,
234
+ 0,
235
+ -1,
236
+ -1,
237
+ -1,
238
+ -1,
239
+ -1,
240
+ 2,
241
+ 2,
242
+ -1,
243
+ 3,
244
+ 3,
245
+ -1,
246
+ 3,
247
+ 1,
248
+ 2,
249
+ -1,
250
+ -1,
251
+ -1,
252
+ 1,
253
+ -1,
254
+ 0,
255
+ 0,
256
+ -1,
257
+ -1,
258
+ -1,
259
+ 3,
260
+ -1,
261
+ -1,
262
+ -1,
263
+ -1,
264
+ -1,
265
+ -1,
266
+ -1,
267
+ -1,
268
+ -1,
269
+ -1,
270
+ -1,
271
+ 1,
272
+ 0,
273
+ -1,
274
+ 3,
275
+ -1,
276
+ -1,
277
+ 2,
278
+ -1,
279
+ 2,
280
+ 3,
281
+ 3,
282
+ -1,
283
+ -1,
284
+ 3,
285
+ -1,
286
+ -1,
287
+ -1,
288
+ 3,
289
+ 2,
290
+ 2,
291
+ 3,
292
+ -1,
293
+ -1,
294
+ 3,
295
+ 3,
296
+ -1,
297
+ -1,
298
+ -1,
299
+ -1,
300
+ 0,
301
+ -1,
302
+ -1,
303
+ 1,
304
+ -1,
305
+ 0,
306
+ -1,
307
+ -1,
308
+ -1,
309
+ 1,
310
+ 0,
311
+ 1,
312
+ -1,
313
+ -1,
314
+ -1,
315
+ -1,
316
+ -1,
317
+ -1,
318
+ -1,
319
+ -1,
320
+ -1,
321
+ -1,
322
+ -1,
323
+ -1,
324
+ -1,
325
+ -1,
326
+ 3,
327
+ 0,
328
+ -1,
329
+ 1,
330
+ -1,
331
+ -1,
332
+ 1,
333
+ -1,
334
+ 0,
335
+ -1,
336
+ -1,
337
+ -1,
338
+ -1,
339
+ -1,
340
+ 0,
341
+ 0,
342
+ 0,
343
+ 0,
344
+ 3,
345
+ -1,
346
+ 1,
347
+ -1,
348
+ -1,
349
+ -1,
350
+ 1,
351
+ -1,
352
+ -1,
353
+ -1,
354
+ -1,
355
+ -1,
356
+ -1,
357
+ -1,
358
+ 0,
359
+ -1,
360
+ -1,
361
+ 0,
362
+ -1,
363
+ 0,
364
+ 0,
365
+ 0,
366
+ 0,
367
+ -1,
368
+ -1,
369
+ -1,
370
+ 0,
371
+ 2,
372
+ 0,
373
+ 0,
374
+ -1,
375
+ 0,
376
+ -1,
377
+ 0,
378
+ 0,
379
+ 0,
380
+ 1,
381
+ 1,
382
+ 0,
383
+ 0,
384
+ -1,
385
+ -1,
386
+ 3,
387
+ 3,
388
+ 0,
389
+ -1,
390
+ 1,
391
+ -1,
392
+ -1,
393
+ -1,
394
+ 1,
395
+ -1,
396
+ -1,
397
+ -1,
398
+ 1,
399
+ -1,
400
+ -1,
401
+ 2,
402
+ -1,
403
+ 0,
404
+ -1,
405
+ -1,
406
+ -1,
407
+ -1,
408
+ 1,
409
+ -1,
410
+ 2,
411
+ -1,
412
+ -1,
413
+ 2,
414
+ 2,
415
+ -1,
416
+ -1,
417
+ 1,
418
+ -1,
419
+ -1,
420
+ 1,
421
+ 1,
422
+ -1,
423
+ -1,
424
+ 2,
425
+ -1,
426
+ -1,
427
+ -1,
428
+ -1,
429
+ -1,
430
+ -1,
431
+ -1,
432
+ 3,
433
+ -1,
434
+ -1,
435
+ 1,
436
+ -1
437
+ ],
438
+ "topic_sizes": {
439
+ "1": 31,
440
+ "-1": 202,
441
+ "2": 28,
442
+ "0": 39,
443
+ "3": 22
444
+ },
445
+ "topic_mapper": [
446
+ [
447
+ -1,
448
+ -1,
449
+ -1
450
+ ],
451
+ [
452
+ 0,
453
+ 0,
454
+ 0
455
+ ],
456
+ [
457
+ 1,
458
+ 1,
459
+ 2
460
+ ],
461
+ [
462
+ 2,
463
+ 2,
464
+ 3
465
+ ],
466
+ [
467
+ 3,
468
+ 3,
469
+ 1
470
+ ]
471
+ ],
472
+ "topic_labels": {
473
+ "-1": "-1_pandemic_rights_nhs_mandates",
474
+ "0": "0_buddhahood_affirmations_zoom_chant",
475
+ "1": "1_vaccines_misinformation_mandates_spreading",
476
+ "2": "2_tapintofreedom_cacuksupport_webinar_2022",
477
+ "3": "3_vaccination_saveourrightsuk_mandatory_employers"
478
+ },
479
+ "custom_labels": null,
480
+ "_outliers": 1,
481
+ "topic_aspects": {}
482
+ }