Add BERTopic model
Browse files- .gitattributes +1 -0
- README.md +118 -0
- config.json +16 -0
- ctfidf.safetensors +3 -0
- ctfidf_config.json +3 -0
- topic_embeddings.safetensors +3 -0
- topics.json +0 -0
.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 |
+
ctfidf_config.json filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
---
|
3 |
+
tags:
|
4 |
+
- bertopic
|
5 |
+
library_name: bertopic
|
6 |
+
pipeline_tag: text-classification
|
7 |
+
---
|
8 |
+
|
9 |
+
# dssg_topicmodel_500000
|
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("sanash43/dssg_topicmodel_500000")
|
27 |
+
|
28 |
+
topic_model.get_topic_info()
|
29 |
+
```
|
30 |
+
|
31 |
+
## Topic overview
|
32 |
+
|
33 |
+
* Number of topics: 49
|
34 |
+
* Number of training documents: 500000
|
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 | the - of - to - and - in | 444110 | 0_the_of_to_and |
|
42 |
+
| 1 | university - college - student - passed - permit | 31380 | 1_university_college_student_passed |
|
43 |
+
| 2 | 001 - 000 - xxxxxxxxxxxx - on9998 - 8703 | 10678 | 2_001_000_xxxxxxxxxxxx_on9998 |
|
44 |
+
| 3 | ergocentric - inc - or - services - 1231 | 3124 | 3_ergocentric_inc_or_services |
|
45 |
+
| 4 | regular - force - labrador - newfoundland - commercial | 1590 | 4_regular_force_labrador_newfoundland |
|
46 |
+
| 5 | seeding - hail - storm - radar - weather | 1228 | 5_seeding_hail_storm_radar |
|
47 |
+
| 6 | 000000 - rental - 42012e12 - 5000 - 2170 | 926 | 6_000000_rental_42012e12_5000 |
|
48 |
+
| 7 | hearing - loss - tinnitus - noise - ear | 796 | 7_hearing_loss_tinnitus_noise |
|
49 |
+
| 8 | the - and - of - in - you | 684 | 8_the_and_of_in |
|
50 |
+
| 9 | traduction - documents - parl - mots - tr03 | 534 | 9_traduction_documents_parl_mots |
|
51 |
+
| 10 | mci - 24 - 1943 - 23 - inst | 517 | 10_mci_24_1943_23 |
|
52 |
+
| 11 | cbsa - lasfc - dasile - demandeurs - total | 467 | 11_cbsa_lasfc_dasile_demandeurs |
|
53 |
+
| 12 | wwater - burlington - laboratory - eclabbur - testing | 424 | 12_wwater_burlington_laboratory_eclabbur |
|
54 |
+
| 13 | epoll - ou - doffres - elector - 10162 | 306 | 13_epoll_ou_doffres_elector |
|
55 |
+
| 14 | heritage - sussex - the - residence - building | 249 | 14_heritage_sussex_the_residence |
|
56 |
+
| 15 | greenough - daycare - wellington - consulting - october | 239 | 15_greenough_daycare_wellington_consulting |
|
57 |
+
| 16 | tage - floor - rue - confirmed - dorchester | 228 | 16_tage_floor_rue_confirmed |
|
58 |
+
| 17 | jeunes - youth - we - de - les | 216 | 17_jeunes_youth_we_de |
|
59 |
+
| 18 | bnp - hartals - violence - the - that | 211 | 18_bnp_hartals_violence_the |
|
60 |
+
| 19 | 10aig - i0aig - 10aic - ioaig - i0aic | 187 | 19_10aig_i0aig_10aic_ioaig |
|
61 |
+
| 20 | complaints - files - case - rdims - vs | 173 | 20_complaints_files_case_rdims |
|
62 |
+
| 21 | mckinsey - formatted - font - publishingemail - page | 165 | 21_mckinsey_formatted_font_publishingemail |
|
63 |
+
| 22 | cerb - english - french - xxxxxxxxxxxx - rdprm | 151 | 22_cerb_english_french_xxxxxxxxxxxx |
|
64 |
+
| 23 | aeroplane - pilot - complete - private - passed | 132 | 23_aeroplane_pilot_complete_private |
|
65 |
+
| 24 | blue - bridge - delay - water - edt | 130 | 24_blue_bridge_delay_water |
|
66 |
+
| 25 | dymista - nasal - fluticasone - propionate - spray | 123 | 25_dymista_nasal_fluticasone_propionate |
|
67 |
+
| 26 | individual - wh - pied - dd - tob | 113 | 26_individual_wh_pied_dd |
|
68 |
+
| 27 | holman - financial - 19971101 - services - ar | 80 | 27_holman_financial_19971101_services |
|
69 |
+
| 28 | pch - anthem - c210 - senator - bill | 77 | 28_pch_anthem_c210_senator |
|
70 |
+
| 29 | 6299 - r300 - assigned - liabilities - 21111 | 72 | 29_6299_r300_assigned_liabilities |
|
71 |
+
| 30 | cad - registered - 000 - eur - 19112015 | 71 | 30_cad_registered_000_eur |
|
72 |
+
| 31 | original - single - age - months - commercial | 70 | 31_original_single_age_months |
|
73 |
+
| 32 | biden - trump - votes - wshdc - election | 57 | 32_biden_trump_votes_wshdc |
|
74 |
+
| 33 | link - bellletstalk - mental - farmers - thefirstsixteen | 54 | 33_link_bellletstalk_mental_farmers |
|
75 |
+
| 34 | visits - average - daily - busiest - active | 44 | 34_visits_average_daily_busiest |
|
76 |
+
| 35 | de - laroport - dorval - mirabel - et | 41 | 35_de_laroport_dorval_mirabel |
|
77 |
+
| 36 | undefined - null - owning - created - status | 40 | 36_undefined_null_owning_created |
|
78 |
+
| 37 | 20190101 - treasurer - 20191231 - pastor - member | 39 | 37_20190101_treasurer_20191231_pastor |
|
79 |
+
| 38 | 1000040908 - protak - consulting - cad - cleared | 37 | 38_1000040908_protak_consulting_cad |
|
80 |
+
| 39 | parental - z5 - 75 - maternity - zq | 27 | 39_parental_z5_75_maternity |
|
81 |
+
| 40 | propane - per - cost - cents - bushel | 26 | 40_propane_per_cost_cents |
|
82 |
+
| 41 | male - haiti - female - minor - colombia | 26 | 41_male_haiti_female_minor |
|
83 |
+
| 42 | tsnrc - tsmrc - sda - standard - option | 25 | 42_tsnrc_tsmrc_sda_standard |
|
84 |
+
| 43 | stakeholders - 10072019 - 0000 - delegation - accredited | 25 | 43_stakeholders_10072019_0000_delegation |
|
85 |
+
| 44 | meop - eoms - multilateral - observation - eom | 25 | 44_meop_eoms_multilateral_observation |
|
86 |
+
| 45 | de - cuves - la - des - anodes | 22 | 45_de_cuves_la_des |
|
87 |
+
| 46 | destroyed - goods - importer - customs - rh | 22 | 46_destroyed_goods_importer_customs |
|
88 |
+
| 47 | pa - mexico - passed - female - male | 21 | 47_pa_mexico_passed_female |
|
89 |
+
| 48 | linda - cheverie - giulia - transcripts - command | 18 | 48_linda_cheverie_giulia_transcripts |
|
90 |
+
|
91 |
+
</details>
|
92 |
+
|
93 |
+
## Training hyperparameters
|
94 |
+
|
95 |
+
* calculate_probabilities: False
|
96 |
+
* language: None
|
97 |
+
* low_memory: False
|
98 |
+
* min_topic_size: 10
|
99 |
+
* n_gram_range: (1, 1)
|
100 |
+
* nr_topics: 50
|
101 |
+
* seed_topic_list: None
|
102 |
+
* top_n_words: 10
|
103 |
+
* verbose: False
|
104 |
+
* zeroshot_min_similarity: 0.7
|
105 |
+
* zeroshot_topic_list: None
|
106 |
+
|
107 |
+
## Framework versions
|
108 |
+
|
109 |
+
* Numpy: 1.26.4
|
110 |
+
* HDBSCAN: 0.8.38.post1
|
111 |
+
* UMAP: 0.5.6
|
112 |
+
* Pandas: 2.2.1
|
113 |
+
* Scikit-Learn: 1.4.0
|
114 |
+
* Sentence-transformers: 3.0.1
|
115 |
+
* Transformers: 4.43.4
|
116 |
+
* Numba: 0.60.0
|
117 |
+
* Plotly: 5.23.0
|
118 |
+
* Python: 3.9.19
|
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": 50,
|
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:ffd20b3e8d2c60256ffb93f31fb67d5b386e612d331005c5dd1bd83a5ee4c5f0
|
3 |
+
size 92497760
|
ctfidf_config.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c01373c972580af0475c831d0338bc414fab7341f46730835578cede09b4911b
|
3 |
+
size 136449418
|
topic_embeddings.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8fa6b0b8f12b4cc0f41edc8337061c60f50e1672af31f738b134d61d373a6bef
|
3 |
+
size 204888
|
topics.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|