brema76 commited on
Commit
b66b004
·
1 Parent(s): 8d30ab9

Add BERTopic model

Browse files
Files changed (6) hide show
  1. README.md +103 -0
  2. config.json +15 -0
  3. ctfidf.bin +3 -0
  4. ctfidf_config.json +0 -0
  5. topic_embeddings.bin +3 -0
  6. topics.json +0 -0
README.md ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ---
3
+ tags:
4
+ - bertopic
5
+ library_name: bertopic
6
+ pipeline_tag: text-classification
7
+ ---
8
+
9
+ # topic_immigration_it
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("brema76/topic_immigration_it")
27
+
28
+ topic_model.get_topic_info()
29
+ ```
30
+
31
+ ## Topic overview
32
+
33
+ * Number of topics: 36
34
+ * Number of training documents: 159408
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
+ | 0 | salvini - immigrato - ong - straniero - mare | 77801 | Crime |
42
+ | 1 | italia - sicilia - italiano - meloni - aquarius | 27045 | Reception |
43
+ | 2 | libia - libico - seawatch - tunisia - tunisino | 18643 | Sea rescue |
44
+ | 3 | ucraino - trump - profugo - polonia - russia | 10779 | Border crisis |
45
+ | 4 | sardegna - video - lampedusa - notte - algerino | 3478 | Landings |
46
+ | 5 | papa - chiesa - francesco - vescovo - papafrancesco | 3395 | The Church's view |
47
+ | 6 | coronavirus - positivo - virus - ospedale - contagio | 2308 | Coronavirus and its spread |
48
+ | 7 | hotspot - protestare - collasso - centro - lampedusa | 2298 | First reception centers |
49
+ | 8 | camion - arrestato - scafista - arresto - furgone | 1624 | Illegal immigration |
50
+ | 9 | incendio - baobab - tendopoli - moria - fiamma | 1046 | Shanty towns |
51
+ | 10 | reddito - pensione - cittadinanza - euro - investimento | 1028 | Economy |
52
+ | 11 | afghanistan - afgano - talebani - kabul - profugo | 1011 | Humanitarian corridors for refugees |
53
+ | 12 | turismo - turista - vacanza - estate - presenza | 798 | Tourism and vacations |
54
+ | 13 | incinta - bambino - donna - neonato - bimbo | 776 | Pregnancy, parenthood, and children |
55
+ | 14 | scuola - università - studente - tutore - lingua | 651 | Education and School-related themes |
56
+ | 15 | vaccino - vaccinato - vaccinale - vaccinare - covid | 650 | Vaccinations and EU digital Covid certificate |
57
+ | 16 | musumeci - ordinanza - islam - islamico - musulmano | 621 | Islam |
58
+ | 17 | alarmphone - egeo - naufragio - bambino - pericolo | 552 | Shipwrecks |
59
+ | 18 | stupro - sessuale - stuprato - violenza - stuprare | 519 | Sexual violence |
60
+ | 19 | multa - ong - decreto - amp - erostraniero | 517 | NGOs regulation |
61
+ | 20 | razzismo - razzista - odio - razziale - insulto | 422 | Racism and Hatred |
62
+ | 21 | agricoltura - schiavo - schiavitù - agricolo - schiavismo | 409 | Illegal work and exploitation |
63
+ | 22 | tubercoloso - malattia - tbc - salute - pandemia | 361 | Disease transmission |
64
+ | 23 | africa - africano - mission - continente - sviluppo | 353 | Cooperation and Development in Africa |
65
+ | 24 | asilo - giudice - richiedente - tribunale - ricorso | 350 | Right to asylum |
66
+ | 25 | dublino - regolamento - riforma - trattato - superare | 310 | EU regulation |
67
+ | 26 | fake - propaganda - fakenews - news - sapevatelo | 285 | Spread of fake news |
68
+ | 27 | droga - cocaina - hashish - eroina - marijuana | 266 | Drugs and Drug Dealing |
69
+ | 28 | film - miglior - oscar - sorrentino - dogman | 263 | Movies |
70
+ | 29 | gay - lgbt - omosessuale - cassazione - lgbti | 149 | LGBTQ+ and sexual minorities' rights |
71
+ | 30 | qatar - qatargate - panzeri - fifa - mondiale | 129 | Quatargate |
72
+ | 31 | perugia - università - suarez - rettore - universitàstranieri | 127 | Luis Suarez's Italian exam scam |
73
+ | 32 | brexit - regno - unito - inglese - qualificato | 120 | Brexit |
74
+ | 33 | basket - calcio - campionato - squadra - giocatore | 117 | Sports |
75
+ | 34 | profugo - volontario - gualzetti - sottoscrizione - accoglienza | 107 | Donations |
76
+ | 35 | matrimonio - combinato - finto - nozze - fittizio | 100 | Marriages and Fake Unions |
77
+
78
+ </details>
79
+
80
+ ## Training hyperparameters
81
+
82
+ * calculate_probabilities: True
83
+ * language: None
84
+ * low_memory: False
85
+ * min_topic_size: 200
86
+ * n_gram_range: (1, 1)
87
+ * nr_topics: auto
88
+ * seed_topic_list: None
89
+ * top_n_words: 15
90
+ * verbose: True
91
+
92
+ ## Framework versions
93
+
94
+ * Numpy: 1.23.5
95
+ * HDBSCAN: 0.8.33
96
+ * UMAP: 0.5.3
97
+ * Pandas: 2.0.3
98
+ * Scikit-Learn: 1.3.0
99
+ * Sentence-transformers: 2.2.2
100
+ * Transformers: 4.33.1
101
+ * Numba: 0.56.4
102
+ * Plotly: 5.16.1
103
+ * Python: 3.10.11
config.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "calculate_probabilities": true,
3
+ "language": null,
4
+ "low_memory": false,
5
+ "min_topic_size": 200,
6
+ "n_gram_range": [
7
+ 1,
8
+ 1
9
+ ],
10
+ "nr_topics": "auto",
11
+ "seed_topic_list": null,
12
+ "top_n_words": 15,
13
+ "verbose": true,
14
+ "embedding_model": "sentence-transformers/paraphrase-multilingual-mpnet-base-v2"
15
+ }
ctfidf.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fa944da93b10f12aca048bdb7d4dd01097a859be1aca8a96ebde4a94e83384cb
3
+ size 1410004
ctfidf_config.json ADDED
The diff for this file is too large to render. See raw diff
 
topic_embeddings.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0237d20acc35cc866fba7a782aa142bbaca990bb8a349a745ff8bedf6881d525
3
+ size 111430
topics.json ADDED
The diff for this file is too large to render. See raw diff