thiagoquilice commited on
Commit
1d9a4b2
·
verified ·
1 Parent(s): b245c01

Add BERTopic model

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ topics.json filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ---
3
+ tags:
4
+ - bertopic
5
+ library_name: bertopic
6
+ pipeline_tag: text-classification
7
+ ---
8
+
9
+ # reduced_tweets_deforestation_pt
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("thiagoquilice/reduced_tweets_deforestation_pt")
27
+
28
+ topic_model.get_topic_info()
29
+ ```
30
+
31
+ ## Topic overview
32
+
33
+ * Number of topics: 30
34
+ * Number of training documents: 1444120
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 | desmatamento - amaz - nia - de - na | 161 | Deforestation in Brazil's Amazon region |
42
+ | 0 | desmatamento - amaz - nia - rt - da | 454142 | Preventing deforestation in the Amazon |
43
+ | 1 | por - bolsonaro - rt - do - governo | 745274 | Political satire and criticism of current events in Brazil |
44
+ | 2 | dasypodidae - encontrados - familia - costumam - tio | 161094 | Dasypodidae family found in Brazil |
45
+ | 3 | noruega - alemanha - nevoa - retiraram - visto | 22453 | Government policies and rural issues in Brazil |
46
+ | 4 | de - do - rt - inpe - que | 15610 | Dasypodidae family found in Brazil |
47
+ | 5 | artesanais - abdicam - manguezal - pescadores - julga | 8545 | Environmental disaster in Brazil |
48
+ | 6 | sat - lite - lan - ado - primeiro | 8258 | Soja production in Roraima |
49
+ | 7 | trilh - administram - fundos - imposs - ativos | 4441 | Protection of the Amazon rainforest |
50
+ | 8 | deixara - bolsonazi - eleito - entrega - resumiu | 3081 | Controversial speech or article |
51
+ | 9 | apres - holanda - ratifica - rejeitar - rcio | 2999 | Economic rankings of Brazil |
52
+ | 10 | psicose - subtitles - bertrand - livro - respondendo | 2724 | Demittance of CNPQ president due to research incentive request |
53
+ | 11 | venda - herdeira - seguinte - ha - pararam | 1855 | Preventing Deforestation in the Amazon |
54
+ | 12 | controlador - blackstone - ceo - schwarzman - steve | 1790 | Stop Deforestation in the Amazon |
55
+ | 13 | veneza - look - festival - paz - impactante | 1583 | Economic impacts of deforestation |
56
+ | 14 | feminismo - machismo - stica - dom - viol | 1300 | German President Merkel suspends investments in Amazon due to record deforestation |
57
+ | 15 | ningu - fala - isso - mais - por | 1209 | Apocalypse and Ferrous Metals |
58
+ | 16 | formando - auxiliar - israel - parceria - objetivo | 1099 | Electoral desmatamento in the Amazon |
59
+ | 17 | perfume - ingrediente - chanel - vendido - possui | 979 | Cientista Carlos Nobre na Empresa: Supera Inpe |
60
+ | 18 | desempregados - comemoravam - motobois - infla - milh | 858 | Debate over deforestation data |
61
+ | 19 | finalizei - acompan - infantaria - brigada - velho | 674 | Agronomic aspects of soybean plant roots |
62
+ | 20 | ndic - kataguiri - kim - resolvi - desconhece | 643 | Deforestation in Brazil |
63
+ | 21 | festa - ulmanos - desejou - bezerros - sacrif | 631 | Financing for environmental projects in Norway and Germany |
64
+ | 22 | cristina - tereza - garante - fundi - regulariza | 561 | Bolsonaro's stance on Amazon deforestation |
65
+ | 23 | comandados - incapazes - mostraram - receberam - jato | 418 | Illegal deforestation and burning in the Amazon |
66
+ | 24 | rcito - ex - higiene - bairros - populares | 415 | Roman weather in May |
67
+ | 25 | prontos - quadros - pms - complementar - bons | 372 | Deforestation in the Amazon in July |
68
+ | 26 | financiados - desvios - criados - empregos - den | 350 | Impact of veganism on the Amazon rainforest |
69
+ | 27 | certif - trading - globais - clientes - chinesa | 327 | Deforestation monitoring using km and quadrados |
70
+ | 28 | sequestro - coopera - resgate - isso - pedido | 274 | Deforestation in the Amazon |
71
+
72
+ </details>
73
+
74
+ ## Training hyperparameters
75
+
76
+ * calculate_probabilities: False
77
+ * language: None
78
+ * low_memory: False
79
+ * min_topic_size: 10
80
+ * n_gram_range: (1, 1)
81
+ * nr_topics: 30
82
+ * seed_topic_list: None
83
+ * top_n_words: 10
84
+ * verbose: True
85
+ * zeroshot_min_similarity: 0.7
86
+ * zeroshot_topic_list: None
87
+
88
+ ## Framework versions
89
+
90
+ * Numpy: 1.25.2
91
+ * HDBSCAN: 0.8.33
92
+ * UMAP: 0.5.5
93
+ * Pandas: 1.5.3
94
+ * Scikit-Learn: 1.2.2
95
+ * Sentence-transformers: 2.6.1
96
+ * Transformers: 4.38.2
97
+ * Numba: 0.58.1
98
+ * Plotly: 5.15.0
99
+ * Python: 3.10.12
config.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "calculate_probabilities": false,
3
+ "language": null,
4
+ "low_memory": false,
5
+ "min_topic_size": 10,
6
+ "n_gram_range": [
7
+ 1,
8
+ 1
9
+ ],
10
+ "nr_topics": 30,
11
+ "seed_topic_list": null,
12
+ "top_n_words": 10,
13
+ "verbose": true,
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:e1c556d92b2acfbd5a21f490101572b967ef3de7a38bce7d9ae7e5b2d65c62c6
3
+ size 2015332
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:7d95cdd951de5ca8cd279671fd3ff9ff099430352cc806ea65f45d50a0337628
3
+ size 92248
topics.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2895f678cf666327e82a813278058ff63cabc8f0c880f1ff7c22e26662dd1f79
3
+ size 14502255