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 |
+
# bertopic-turkish-political
|
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("yeniguno/bertopic-turkish-political")
|
27 |
+
|
28 |
+
topic_model.get_topic_info()
|
29 |
+
```
|
30 |
+
|
31 |
+
## Topic overview
|
32 |
+
|
33 |
+
* Number of topics: 10
|
34 |
+
* Number of training documents: 45249
|
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 | türkiye - halk - iktidar - muhalefet - seçmen | 281 | -1_türkiye_halk_iktidar_muhalefet |
|
42 |
+
| 0 | türkiye - atatürk - seçmen - siyaset - halk | 20262 | 0_türkiye_atatürk_seçmen_siyaset |
|
43 |
+
| 1 | olmak - iktidar - ekonomik - gerekmek - görüş | 12760 | 1_olmak_iktidar_ekonomik_gerekmek |
|
44 |
+
| 2 | seçim - seçmen - koalisyon - meclis - ittifak | 3395 | 2_seçim_seçmen_koalisyon_meclis |
|
45 |
+
| 3 | medya - milliyet - muhalefet - politik - faşist | 3065 | 3_medya_milliyet_muhalefet_politik |
|
46 |
+
| 4 | terör - şiddet - saldırı - terörist - toplum | 2437 | 4_terör_şiddet_saldırı_terörist |
|
47 |
+
| 5 | mahkeme - yargı - toplum - kavram - hukuk | 1641 | 5_mahkeme_yargı_toplum_kavram |
|
48 |
+
| 6 | seçim - meclis - endişe - sonuç - zor | 648 | 6_seçim_meclis_endişe_sonuç |
|
49 |
+
| 7 | köpek - sokak - park - protesto - taksi | 473 | 7_köpek_sokak_park_protesto |
|
50 |
+
| 8 | cinsiyet - lgbt - siyaset - cinsel - tecavüz | 287 | 8_cinsiyet_lgbt_siyaset_cinsel |
|
51 |
+
|
52 |
+
</details>
|
53 |
+
|
54 |
+
## Training hyperparameters
|
55 |
+
|
56 |
+
* calculate_probabilities: False
|
57 |
+
* language: None
|
58 |
+
* low_memory: False
|
59 |
+
* min_topic_size: 100
|
60 |
+
* n_gram_range: (1, 1)
|
61 |
+
* nr_topics: 10
|
62 |
+
* seed_topic_list: None
|
63 |
+
* top_n_words: 10
|
64 |
+
* verbose: False
|
65 |
+
* zeroshot_min_similarity: 0.7
|
66 |
+
* zeroshot_topic_list: None
|
67 |
+
|
68 |
+
## Framework versions
|
69 |
+
|
70 |
+
* Numpy: 1.26.4
|
71 |
+
* HDBSCAN: 0.8.40
|
72 |
+
* UMAP: 0.5.7
|
73 |
+
* Pandas: 2.2.2
|
74 |
+
* Scikit-Learn: 1.6.1
|
75 |
+
* Sentence-transformers: 3.3.1
|
76 |
+
* Transformers: 4.47.1
|
77 |
+
* Numba: 0.60.0
|
78 |
+
* Plotly: 5.24.1
|
79 |
+
* Python: 3.11.11
|
config.json
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"calculate_probabilities": false,
|
3 |
+
"language": null,
|
4 |
+
"low_memory": false,
|
5 |
+
"min_topic_size": 100,
|
6 |
+
"n_gram_range": [
|
7 |
+
1,
|
8 |
+
1
|
9 |
+
],
|
10 |
+
"nr_topics": 10,
|
11 |
+
"seed_topic_list": null,
|
12 |
+
"top_n_words": 10,
|
13 |
+
"verbose": false,
|
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:6ba936671c051bff43e2563b78d199ab977145ddcc444e868c2d495bd56e72f2
|
3 |
+
size 518488
|
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:a8859f196dc4f722949ddaaf17347afd0ec13c722946cd7fd257c672f0e88169
|
3 |
+
size 30808
|
topics.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|