Add BERTopic model
Browse files- README.md +151 -0
- config.json +15 -0
- topic_embeddings.safetensors +3 -0
- topics.json +0 -0
README.md
ADDED
@@ -0,0 +1,151 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
---
|
3 |
+
tags:
|
4 |
+
- bertopic
|
5 |
+
library_name: bertopic
|
6 |
+
pipeline_tag: text-classification
|
7 |
+
---
|
8 |
+
|
9 |
+
# xsum_108_50000_25000_test
|
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("KingKazma/xsum_108_50000_25000_test")
|
27 |
+
|
28 |
+
topic_model.get_topic_info()
|
29 |
+
```
|
30 |
+
|
31 |
+
## Topic overview
|
32 |
+
|
33 |
+
* Number of topics: 84
|
34 |
+
* Number of training documents: 11334
|
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 | said - mr - people - would - year | 5 | -1_said_mr_people_would |
|
42 |
+
| 0 | win - goal - game - league - foul | 4854 | 0_win_goal_game_league |
|
43 |
+
| 1 | police - court - said - officer - mr | 1637 | 1_police_court_said_officer |
|
44 |
+
| 2 | labour - party - eu - election - vote | 872 | 2_labour_party_eu_election |
|
45 |
+
| 3 | health - care - nhs - patient - cancer | 341 | 3_health_care_nhs_patient |
|
46 |
+
| 4 | olympic - sport - race - gold - medal | 325 | 4_olympic_sport_race_gold |
|
47 |
+
| 5 | cricket - england - wicket - test - captain | 278 | 5_cricket_england_wicket_test |
|
48 |
+
| 6 | animal - dog - bird - whale - specie | 206 | 6_animal_dog_bird_whale |
|
49 |
+
| 7 | bridge - rail - council - said - transport | 199 | 7_bridge_rail_council_said |
|
50 |
+
| 8 | school - education - student - teacher - university | 193 | 8_school_education_student_teacher |
|
51 |
+
| 9 | bank - rate - growth - economy - market | 181 | 9_bank_rate_growth_economy |
|
52 |
+
| 10 | syria - syrian - iraq - iran - force | 145 | 10_syria_syrian_iraq_iran |
|
53 |
+
| 11 | energy - industry - wind - electricity - company | 119 | 11_energy_industry_wind_electricity |
|
54 |
+
| 12 | film - actress - star - actor - character | 80 | 12_film_actress_star_actor |
|
55 |
+
| 13 | president - boko - african - haram - mr | 79 | 13_president_boko_african_haram |
|
56 |
+
| 14 | fire - blaze - service - smoke - said | 79 | 14_fire_blaze_service_smoke |
|
57 |
+
| 15 | trump - mr - republican - trumps - president | 75 | 15_trump_mr_republican_trumps |
|
58 |
+
| 16 | music - album - song - band - singer | 70 | 16_music_album_song_band |
|
59 |
+
| 17 | race - hamilton - f1 - mercedes - lap | 68 | 17_race_hamilton_f1_mercedes |
|
60 |
+
| 18 | space - earth - planet - solar - orbit | 61 | 18_space_earth_planet_solar |
|
61 |
+
| 19 | lifeboat - rnli - beach - coastguard - rescue | 55 | 19_lifeboat_rnli_beach_coastguard |
|
62 |
+
| 20 | flood - flooding - water - weather - rain | 55 | 20_flood_flooding_water_weather |
|
63 |
+
| 21 | fight - boxing - champion - joshua - ali | 54 | 21_fight_boxing_champion_joshua |
|
64 |
+
| 22 | plane - aircraft - flight - passenger - pilot | 54 | 22_plane_aircraft_flight_passenger |
|
65 |
+
| 23 | earthquake - quake - flood - people - water | 53 | 23_earthquake_quake_flood_people |
|
66 |
+
| 24 | russian - russia - ukraine - putin - ukrainian | 49 | 24_russian_russia_ukraine_putin |
|
67 |
+
| 25 | murray - match - wimbledon - tennis - konta | 47 | 25_murray_match_wimbledon_tennis |
|
68 |
+
| 26 | bitcoin - security - talktalk - data - tor | 44 | 26_bitcoin_security_talktalk_data |
|
69 |
+
| 27 | round - birdie - bogey - par - shot | 41 | 27_round_birdie_bogey_par |
|
70 |
+
| 28 | ireland - dup - sinn - northern - party | 39 | 28_ireland_dup_sinn_northern |
|
71 |
+
| 29 | maduro - venezuela - president - venezuelan - opposition | 36 | 29_maduro_venezuela_president_venezuelan |
|
72 |
+
| 30 | yn - ar - yr - ei - wedi | 36 | 30_yn_ar_yr_ei |
|
73 |
+
| 31 | painting - art - gallery - portrait - museum | 34 | 31_painting_art_gallery_portrait |
|
74 |
+
| 32 | unsupported - updated - bst - playback - media | 33 | 32_unsupported_updated_bst_playback |
|
75 |
+
| 33 | migrant - eu - asylum - turkey - germany | 31 | 33_migrant_eu_asylum_turkey |
|
76 |
+
| 34 | stone - cave - discovery - site - tree | 30 | 34_stone_cave_discovery_site |
|
77 |
+
| 35 | parade - poppy - flag - jesus - statue | 30 | 35_parade_poppy_flag_jesus |
|
78 |
+
| 36 | drug - cannabis - drugs - heroin - cocaine | 27 | 36_drug_cannabis_drugs_heroin |
|
79 |
+
| 37 | church - pope - bishop - vatican - cardinal | 27 | 37_church_pope_bishop_vatican |
|
80 |
+
| 38 | greek - greece - bailout - eurozone - bank | 27 | 38_greek_greece_bailout_eurozone |
|
81 |
+
| 39 | nama - ireland - northern - cerberus - irish | 26 | 39_nama_ireland_northern_cerberus |
|
82 |
+
| 40 | prison - prisoner - prisons - justice - turing | 25 | 40_prison_prisoner_prisons_justice |
|
83 |
+
| 41 | radio - show - bbc - series - programme | 24 | 41_radio_show_bbc_series |
|
84 |
+
| 42 | fifa - blatter - platini - fifas - football | 23 | 42_fifa_blatter_platini_fifas |
|
85 |
+
| 43 | tesco - sale - store - supermarket - customer | 23 | 43_tesco_sale_store_supermarket |
|
86 |
+
| 44 | china - taiwan - chinese - hong - taiwans | 22 | 44_china_taiwan_chinese_hong |
|
87 |
+
| 45 | afghan - taliban - afghanistan - mansour - mullah | 22 | 45_afghan_taliban_afghanistan_mansour |
|
88 |
+
| 46 | council - local - funding - government - authority | 22 | 46_council_local_funding_government |
|
89 |
+
| 47 | nsa - encryption - cia - snowden - us | 21 | 47_nsa_encryption_cia_snowden |
|
90 |
+
| 48 | ice - glacier - temperature - ocean - climate | 21 | 48_ice_glacier_temperature_ocean |
|
91 |
+
| 49 | osullivan - world - snooker - beat - champion | 21 | 49_osullivan_world_snooker_beat |
|
92 |
+
| 50 | book - prize - novel - author - award | 20 | 50_book_prize_novel_author |
|
93 |
+
| 51 | auschwitz - jews - holocaust - camp - winton | 20 | 51_auschwitz_jews_holocaust_camp |
|
94 |
+
| 52 | samsung - apple - phone - company - battery | 19 | 52_samsung_apple_phone_company |
|
95 |
+
| 53 | picture - image - pictures - please - submit | 19 | 53_picture_image_pictures_please |
|
96 |
+
| 54 | korea - north - korean - missile - koreas | 19 | 54_korea_north_korean_missile |
|
97 |
+
| 55 | pension - worker - pay - work - hour | 19 | 55_pension_worker_pay_work |
|
98 |
+
| 56 | pen - fillon - le - macron - mr | 18 | 56_pen_fillon_le_macron |
|
99 |
+
| 57 | paris - eaw - french - attack - suspect | 18 | 57_paris_eaw_french_attack |
|
100 |
+
| 58 | content - app - tv - digital - apple | 18 | 58_content_app_tv_digital |
|
101 |
+
| 59 | israel - israeli - palestinians - palestinian - gaza | 17 | 59_israel_israeli_palestinians_palestinian |
|
102 |
+
| 60 | housing - affordable - rent - homelessness - government | 17 | 60_housing_affordable_rent_homelessness |
|
103 |
+
| 61 | prince - queen - birthday - duke - royal | 17 | 61_prince_queen_birthday_duke |
|
104 |
+
| 62 | australia - australian - asylum - visa - abbott | 15 | 62_australia_australian_asylum_visa |
|
105 |
+
| 63 | tax - spending - cut - osborne - fiscal | 15 | 63_tax_spending_cut_osborne |
|
106 |
+
| 64 | updated - 2017 - bst - last - gmt | 14 | 64_updated_2017_bst_last |
|
107 |
+
| 65 | refugee - uk - child - vulnerable - refugees | 12 | 65_refugee_uk_child_vulnerable |
|
108 |
+
| 66 | ebola - sierra - leone - outbreak - liberia | 12 | 66_ebola_sierra_leone_outbreak |
|
109 |
+
| 67 | shah - ahmed - mosque - muslims - prophet | 11 | 67_shah_ahmed_mosque_muslims |
|
110 |
+
| 68 | broadband - 4g - ee - customer - internet | 11 | 68_broadband_4g_ee_customer |
|
111 |
+
| 69 | pistorius - steenkamp - toilet - door - reeva | 10 | 69_pistorius_steenkamp_toilet_door |
|
112 |
+
| 70 | eu - uk - population - migrant - trade | 9 | 70_eu_uk_population_migrant |
|
113 |
+
| 71 | australia - marriage - turnbull - katter - samesex | 9 | 71_australia_marriage_turnbull_katter |
|
114 |
+
| 72 | sugar - gin - sabmiller - inbev - ab | 8 | 72_sugar_gin_sabmiller_inbev |
|
115 |
+
| 73 | suu - kyi - rohingya - rakhine - myanmar | 8 | 73_suu_kyi_rohingya_rakhine |
|
116 |
+
| 74 | nadeau - field - aircraft - cordon - accidents | 8 | 74_nadeau_field_aircraft_cordon |
|
117 |
+
| 75 | abortion - ireland - law - unborn - case | 8 | 75_abortion_ireland_law_unborn |
|
118 |
+
| 76 | homosexuality - tor - homosexual - law - gay | 7 | 76_homosexuality_tor_homosexual_law |
|
119 |
+
| 77 | castro - cuba - cuban - fidel - havana | 7 | 77_castro_cuba_cuban_fidel |
|
120 |
+
| 78 | china - samsung - firm - business - cheil | 7 | 78_china_samsung_firm_business |
|
121 |
+
| 79 | event - festival - technology - campsite - interactive | 6 | 79_event_festival_technology_campsite |
|
122 |
+
| 80 | vw - volkswagen - production - emission - carmaker | 6 | 80_vw_volkswagen_production_emission |
|
123 |
+
| 81 | mohammed - gjolla - sheriff - nca - terrorism | 6 | 81_mohammed_gjolla_sheriff_nca |
|
124 |
+
| 82 | tb - tuberculosis - disease - badger - zoonotic | 5 | 82_tb_tuberculosis_disease_badger |
|
125 |
+
|
126 |
+
</details>
|
127 |
+
|
128 |
+
## Training hyperparameters
|
129 |
+
|
130 |
+
* calculate_probabilities: True
|
131 |
+
* language: english
|
132 |
+
* low_memory: False
|
133 |
+
* min_topic_size: 10
|
134 |
+
* n_gram_range: (1, 1)
|
135 |
+
* nr_topics: None
|
136 |
+
* seed_topic_list: None
|
137 |
+
* top_n_words: 10
|
138 |
+
* verbose: False
|
139 |
+
|
140 |
+
## Framework versions
|
141 |
+
|
142 |
+
* Numpy: 1.22.4
|
143 |
+
* HDBSCAN: 0.8.33
|
144 |
+
* UMAP: 0.5.3
|
145 |
+
* Pandas: 1.5.3
|
146 |
+
* Scikit-Learn: 1.2.2
|
147 |
+
* Sentence-transformers: 2.2.2
|
148 |
+
* Transformers: 4.31.0
|
149 |
+
* Numba: 0.57.1
|
150 |
+
* Plotly: 5.13.1
|
151 |
+
* Python: 3.10.12
|
config.json
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"calculate_probabilities": true,
|
3 |
+
"language": "english",
|
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 |
+
"embedding_model": "sentence-transformers/all-MiniLM-L6-v2"
|
15 |
+
}
|
topic_embeddings.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:bae0766aa3543b0892e096e1f4ca6ae06c05767b5fbe1ec526d4d764aa29ed6f
|
3 |
+
size 129112
|
topics.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|