Add BERTopic model
Browse files- README.md +85 -0
- config.json +31 -0
- ctfidf.safetensors +3 -0
- ctfidf_config.json +0 -0
- topic_embeddings.safetensors +3 -0
- topics.json +0 -0
README.md
ADDED
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
---
|
3 |
+
tags:
|
4 |
+
- bertopic
|
5 |
+
library_name: bertopic
|
6 |
+
pipeline_tag: text-classification
|
7 |
+
---
|
8 |
+
|
9 |
+
# bertopic_ready_labeled
|
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("DobreMihai/bertopic_ready_labeled")
|
27 |
+
|
28 |
+
topic_model.get_topic_info()
|
29 |
+
```
|
30 |
+
|
31 |
+
## Topic overview
|
32 |
+
|
33 |
+
* Number of topics: 16
|
34 |
+
* Number of training documents: 24020
|
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 | be - it - the - to - alarm | 11 | -1_be_it_the_to |
|
42 |
+
| 0 | math - app - up - to - wake | 9581 | Math |
|
43 |
+
| 1 | not - the - alarm - it - off | 4179 | Sometimes not Ringing |
|
44 |
+
| 2 | snooze - - - - | 2294 | Good App |
|
45 |
+
| 3 | loud - - - - | 2279 | Premium Subscription |
|
46 |
+
| 4 | be - premium - the - to - pay | 1866 | Loud |
|
47 |
+
| 5 | camera - - - - | 1753 | Take Photo |
|
48 |
+
| 6 | snooze - the - to - be - button | 603 | Snooze |
|
49 |
+
| 7 | easy - use - simple - and - to | 381 | Easy to Use |
|
50 |
+
| 8 | barcode - scan - the - code - to | 294 | Barcode Scanner |
|
51 |
+
| 9 | ring - not - it - do - work | 282 | Update |
|
52 |
+
| 10 | shake - it - the - phone - to | 263 | Shake Mission |
|
53 |
+
| 11 | horoscope - be - it - and - news | 99 | Horoscope/News |
|
54 |
+
| 12 | hot - phone - overheat - my - heat | 93 | Overheating |
|
55 |
+
| 13 | mb - space - storage - app - be | 21 | Storage Size |
|
56 |
+
| 14 | challenge - solve - purpose - fun - winner | 21 | Challenges |
|
57 |
+
|
58 |
+
</details>
|
59 |
+
|
60 |
+
## Training hyperparameters
|
61 |
+
|
62 |
+
* calculate_probabilities: False
|
63 |
+
* language: english
|
64 |
+
* low_memory: False
|
65 |
+
* min_topic_size: 10
|
66 |
+
* n_gram_range: (1, 1)
|
67 |
+
* nr_topics: 50
|
68 |
+
* seed_topic_list: None
|
69 |
+
* top_n_words: 10
|
70 |
+
* verbose: False
|
71 |
+
* zeroshot_min_similarity: 0.85
|
72 |
+
* zeroshot_topic_list: ['android', 'premium*', 'ads', 'math', 'subscription', 'update', 'camera', 'shake', 'weather', 'snooze', 'loud', 'doesn', 'off']
|
73 |
+
|
74 |
+
## Framework versions
|
75 |
+
|
76 |
+
* Numpy: 1.26.4
|
77 |
+
* HDBSCAN: 0.8.38.post1
|
78 |
+
* UMAP: 0.5.6
|
79 |
+
* Pandas: 2.2.1
|
80 |
+
* Scikit-Learn: 1.5.2
|
81 |
+
* Sentence-transformers: 3.1.0
|
82 |
+
* Transformers: 4.44.2
|
83 |
+
* Numba: 0.60.0
|
84 |
+
* Plotly: 5.24.1
|
85 |
+
* Python: 3.10.15
|
config.json
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"calculate_probabilities": false,
|
3 |
+
"language": "english",
|
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.85,
|
15 |
+
"zeroshot_topic_list": [
|
16 |
+
"android",
|
17 |
+
"premium*",
|
18 |
+
"ads",
|
19 |
+
"math",
|
20 |
+
"subscription",
|
21 |
+
"update",
|
22 |
+
"camera",
|
23 |
+
"shake",
|
24 |
+
"weather",
|
25 |
+
"snooze",
|
26 |
+
"loud",
|
27 |
+
"doesn",
|
28 |
+
"off"
|
29 |
+
],
|
30 |
+
"embedding_model": "sentence-transformers/all-MiniLM-L6-v2"
|
31 |
+
}
|
ctfidf.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9671eccc4f5dd06d8bf0847a7d1a3f1c80fe61c680c620c90f5f576095b1059b
|
3 |
+
size 438840
|
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:88cdae70b48303861fe28145f6e1f307e5e40ed24655cebccb30de16cf590611
|
3 |
+
size 24664
|
topics.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|