Commit
·
997e8ff
1
Parent(s):
ea45207
Add BERTopic model
Browse files- README.md +68 -0
- config.json +15 -0
- topic_embeddings.safetensors +3 -0
- topics.json +84 -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 |
+
# testcompany-firstmodel
|
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("syntag/testcompany-firstmodel")
|
27 |
+
|
28 |
+
topic_model.get_topic_info()
|
29 |
+
```
|
30 |
+
|
31 |
+
## Topic overview
|
32 |
+
|
33 |
+
* Number of topics: 1
|
34 |
+
* Number of training documents: 20
|
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 - and - is - to - new | 20 | -1_the_and_is_to |
|
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.4
|
60 |
+
* HDBSCAN: 0.8.33
|
61 |
+
* UMAP: 0.5.4
|
62 |
+
* Pandas: 2.0.3
|
63 |
+
* Scikit-Learn: 1.3.1
|
64 |
+
* Sentence-transformers: 2.2.2
|
65 |
+
* Transformers: 4.34.1
|
66 |
+
* Numba: 0.58.1
|
67 |
+
* Plotly: 5.17.0
|
68 |
+
* Python: 3.8.18
|
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:37af2ea3a82d62f99d7f7893aa93ce2c43c87ebcc644a065cd89bc88bec38c26
|
3 |
+
size 1624
|
topics.json
ADDED
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"topic_representations": {
|
3 |
+
"-1": [
|
4 |
+
[
|
5 |
+
"the",
|
6 |
+
0.18873772379335946
|
7 |
+
],
|
8 |
+
[
|
9 |
+
"and",
|
10 |
+
0.1803097274711684
|
11 |
+
],
|
12 |
+
[
|
13 |
+
"is",
|
14 |
+
0.09962990594386198
|
15 |
+
],
|
16 |
+
[
|
17 |
+
"to",
|
18 |
+
0.09962990594386198
|
19 |
+
],
|
20 |
+
[
|
21 |
+
"new",
|
22 |
+
0.08710398759233988
|
23 |
+
],
|
24 |
+
[
|
25 |
+
"are",
|
26 |
+
0.08710398759233988
|
27 |
+
],
|
28 |
+
[
|
29 |
+
"of",
|
30 |
+
0.07369510129820897
|
31 |
+
],
|
32 |
+
[
|
33 |
+
"with",
|
34 |
+
0.05916812494747216
|
35 |
+
],
|
36 |
+
[
|
37 |
+
"different",
|
38 |
+
0.04312367308066437
|
39 |
+
],
|
40 |
+
[
|
41 |
+
"enjoy",
|
42 |
+
0.04312367308066437
|
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 |
+
-1,
|
65 |
+
-1,
|
66 |
+
-1
|
67 |
+
],
|
68 |
+
"topic_sizes": {
|
69 |
+
"-1": 20
|
70 |
+
},
|
71 |
+
"topic_mapper": [
|
72 |
+
[
|
73 |
+
-1,
|
74 |
+
-1,
|
75 |
+
-1
|
76 |
+
]
|
77 |
+
],
|
78 |
+
"topic_labels": {
|
79 |
+
"-1": "-1_the_and_is_to"
|
80 |
+
},
|
81 |
+
"custom_labels": null,
|
82 |
+
"_outliers": 1,
|
83 |
+
"topic_aspects": {}
|
84 |
+
}
|