baseball46245
commited on
Commit
•
82d926b
1
Parent(s):
7fc344e
Add BERTopic model
Browse files- README.md +68 -0
- config.json +15 -0
- topic_embeddings.safetensors +3 -0
- topics.json +81 -0
README.md
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
---
|
3 |
+
tags:
|
4 |
+
- bertopic
|
5 |
+
library_name: bertopic
|
6 |
+
pipeline_tag: text-classification
|
7 |
+
---
|
8 |
+
|
9 |
+
# testmodel1
|
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("baseball46245/testmodel1")
|
27 |
+
|
28 |
+
topic_model.get_topic_info()
|
29 |
+
```
|
30 |
+
|
31 |
+
## Topic overview
|
32 |
+
|
33 |
+
* Number of topics: 1
|
34 |
+
* Number of training documents: 17
|
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 | the - of - and - ai - to | 17 | -1_the_of_and_ai |
|
42 |
+
|
43 |
+
</details>
|
44 |
+
|
45 |
+
## Training hyperparameters
|
46 |
+
|
47 |
+
* calculate_probabilities: False
|
48 |
+
* language: english
|
49 |
+
* low_memory: False
|
50 |
+
* min_topic_size: 10
|
51 |
+
* n_gram_range: (1, 1)
|
52 |
+
* nr_topics: None
|
53 |
+
* seed_topic_list: None
|
54 |
+
* top_n_words: 10
|
55 |
+
* verbose: False
|
56 |
+
|
57 |
+
## Framework versions
|
58 |
+
|
59 |
+
* Numpy: 1.24.3
|
60 |
+
* HDBSCAN: 0.8.29
|
61 |
+
* UMAP: 0.5.3
|
62 |
+
* Pandas: 2.0.2
|
63 |
+
* Scikit-Learn: 1.2.2
|
64 |
+
* Sentence-transformers: 2.2.2
|
65 |
+
* Transformers: 4.30.1
|
66 |
+
* Numba: 0.57.0
|
67 |
+
* Plotly: 5.15.0
|
68 |
+
* Python: 3.10.6
|
config.json
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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": 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:a233babb3c7237bf6a63110f243f2644100ab4389cbec4fabe2be64c8d1d17f8
|
3 |
+
size 1624
|
topics.json
ADDED
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"topic_representations": {
|
3 |
+
"-1": [
|
4 |
+
[
|
5 |
+
"the",
|
6 |
+
0.12954182226104918
|
7 |
+
],
|
8 |
+
[
|
9 |
+
"of",
|
10 |
+
0.11953036950713802
|
11 |
+
],
|
12 |
+
[
|
13 |
+
"and",
|
14 |
+
0.10904205253037412
|
15 |
+
],
|
16 |
+
[
|
17 |
+
"ai",
|
18 |
+
0.105428448776221
|
19 |
+
],
|
20 |
+
[
|
21 |
+
"to",
|
22 |
+
0.09030216703646363
|
23 |
+
],
|
24 |
+
[
|
25 |
+
"in",
|
26 |
+
0.0822788017602565
|
27 |
+
],
|
28 |
+
[
|
29 |
+
"data",
|
30 |
+
0.07389214731356038
|
31 |
+
],
|
32 |
+
[
|
33 |
+
"not",
|
34 |
+
0.050894520347419245
|
35 |
+
],
|
36 |
+
[
|
37 |
+
"is",
|
38 |
+
0.050894520347419245
|
39 |
+
],
|
40 |
+
[
|
41 |
+
"its",
|
42 |
+
0.045842774645202373
|
43 |
+
]
|
44 |
+
]
|
45 |
+
},
|
46 |
+
"topics": [
|
47 |
+
-1,
|
48 |
+
-1,
|
49 |
+
-1,
|
50 |
+
-1,
|
51 |
+
-1,
|
52 |
+
-1,
|
53 |
+
-1,
|
54 |
+
-1,
|
55 |
+
-1,
|
56 |
+
-1,
|
57 |
+
-1,
|
58 |
+
-1,
|
59 |
+
-1,
|
60 |
+
-1,
|
61 |
+
-1,
|
62 |
+
-1,
|
63 |
+
-1
|
64 |
+
],
|
65 |
+
"topic_sizes": {
|
66 |
+
"-1": 17
|
67 |
+
},
|
68 |
+
"topic_mapper": [
|
69 |
+
[
|
70 |
+
-1,
|
71 |
+
-1,
|
72 |
+
-1
|
73 |
+
]
|
74 |
+
],
|
75 |
+
"topic_labels": {
|
76 |
+
"-1": "-1_the_of_and_ai"
|
77 |
+
},
|
78 |
+
"custom_labels": null,
|
79 |
+
"_outliers": 1,
|
80 |
+
"topic_aspects": {}
|
81 |
+
}
|