Add BERTopic model
Browse files- README.md +79 -0
- config.json +16 -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,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
---
|
| 3 |
+
tags:
|
| 4 |
+
- bertopic
|
| 5 |
+
library_name: bertopic
|
| 6 |
+
pipeline_tag: text-classification
|
| 7 |
+
---
|
| 8 |
+
|
| 9 |
+
# TopicModel_StoreReviews
|
| 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("shantanudave/TopicModel_StoreReviews")
|
| 27 |
+
|
| 28 |
+
topic_model.get_topic_info()
|
| 29 |
+
```
|
| 30 |
+
|
| 31 |
+
## Topic overview
|
| 32 |
+
|
| 33 |
+
* Number of topics: 10
|
| 34 |
+
* Number of training documents: 14747
|
| 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 | clothing - clothes - fashion - clothe - clothing store | 2672 | Fashionable Clothing Selection |
|
| 42 |
+
| 1 | shopping - shop - price - cheap - store | 1864 | Diverse Shopping Experiences |
|
| 43 |
+
| 2 | tidy - clean - branch - range - renovation | 1807 | Clean Retail Space |
|
| 44 |
+
| 3 | quality - offer - use - stop - good | 1793 | Quality Offer Search |
|
| 45 |
+
| 4 | selection - choice - large - large selection - size | 1459 | Large Size Selection |
|
| 46 |
+
| 5 | advice - saleswoman - service - friendly - competent | 1447 | Friendly Saleswoman Service |
|
| 47 |
+
| 6 | staff - friendly staff - staff staff - staff friendly - friendly | 1177 | Friendly Staff Selection |
|
| 48 |
+
| 7 | wow - waw - oh - yeah - | 1108 | Expressive Words Discovery |
|
| 49 |
+
| 8 | voucher - money - return - exchange - cash | 933 | Customer Return Experience |
|
| 50 |
+
| 9 | super - friendly super - super friendly - pleasure - super service | 487 | super friendly service |
|
| 51 |
+
|
| 52 |
+
</details>
|
| 53 |
+
|
| 54 |
+
## Training hyperparameters
|
| 55 |
+
|
| 56 |
+
* calculate_probabilities: True
|
| 57 |
+
* language: None
|
| 58 |
+
* low_memory: False
|
| 59 |
+
* min_topic_size: 10
|
| 60 |
+
* n_gram_range: (1, 1)
|
| 61 |
+
* nr_topics: None
|
| 62 |
+
* seed_topic_list: None
|
| 63 |
+
* top_n_words: 10
|
| 64 |
+
* verbose: True
|
| 65 |
+
* zeroshot_min_similarity: 0.7
|
| 66 |
+
* zeroshot_topic_list: None
|
| 67 |
+
|
| 68 |
+
## Framework versions
|
| 69 |
+
|
| 70 |
+
* Numpy: 1.23.5
|
| 71 |
+
* HDBSCAN: 0.8.33
|
| 72 |
+
* UMAP: 0.5.5
|
| 73 |
+
* Pandas: 1.3.5
|
| 74 |
+
* Scikit-Learn: 1.4.1.post1
|
| 75 |
+
* Sentence-transformers: 2.6.1
|
| 76 |
+
* Transformers: 4.39.3
|
| 77 |
+
* Numba: 0.59.1
|
| 78 |
+
* Plotly: 5.21.0
|
| 79 |
+
* Python: 3.10.13
|
config.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"calculate_probabilities": true,
|
| 3 |
+
"language": null,
|
| 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": 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:6e7d0d77830e8786c6a4b877939cd10ec2aa43b6bdde1017124138068482f045
|
| 3 |
+
size 415780
|
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:850949e2d22caf8a0fb9afb425c72af98c72dc92b4a18441d2da72a0f58deba3
|
| 3 |
+
size 15448
|
topics.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|