|
20 | 20 |
|
21 | 21 | > This package is still work in progress and scientific papers on some of the novel methods are currently undergoing peer-review. If you use this package and you encounter any problem, let us know by opening relevant issues. |
22 | 22 |
|
23 | | -### New in version 0.8.0 |
| 23 | +### New in version 0.9.0 |
24 | 24 |
|
25 | | -#### Automated Topic Naming |
26 | | - |
27 | | -Turftopic now allows you to automatically assign human readable names to topics using LLMs or n-gram retrieval! |
| 25 | +#### Dynamic S³ 🧭 |
28 | 26 |
|
| 27 | +You can now use Semantic Signal Separation in a dynamic fashion. |
| 28 | +This allows you to investigate how semantic axes fluctuate over time, and how their content changes. |
29 | 29 | ```python |
30 | | -from turftopic import KeyNMF |
31 | | -from turftopic.namers import OpenAITopicNamer |
| 30 | +from turftopic import SemanticSignalSeparation |
32 | 31 |
|
33 | | -model = KeyNMF(10).fit(corpus) |
| 32 | +model = SemanticSignalSeparation(10).fit_dynamic(corpus, timestamps=ts, bins=10) |
34 | 33 |
|
35 | | -namer = OpenAITopicNamer("gpt-4o-mini") |
36 | | -model.rename_topics(namer) |
37 | | -model.print_topics() |
| 34 | +model.plot_topics_over_time() |
38 | 35 | ``` |
39 | 36 |
|
40 | | -| Topic ID | Topic Name | Highest Ranking | |
41 | | -| - | - | - | |
42 | | -| 0 | Operating Systems and Software | windows, dos, os, ms, microsoft, unix, nt, memory, program, apps | |
43 | | -| 1 | Atheism and Belief Systems | atheism, atheist, atheists, belief, religion, religious, theists, beliefs, believe, faith | |
44 | | -| 2 | Computer Architecture and Performance | motherboard, ram, memory, cpu, bios, isa, speed, 486, bus, performance | |
45 | | -| 3 | Storage Technologies | disk, drive, scsi, drives, disks, floppy, ide, dos, controller, boot | |
46 | | -| | ... | |
47 | 37 |
|
48 | 38 | ## Basics [(Documentation)](https://x-tabdeveloping.github.io/turftopic/) |
49 | 39 | [](https://colab.research.google.com/github/x-tabdeveloping/turftopic/blob/main/examples/basic_example_20newsgroups.ipynb) |
@@ -143,6 +133,29 @@ model.print_topic_distribution( |
143 | 133 |
|
144 | 134 | </center> |
145 | 135 |
|
| 136 | +#### Automated Topic Naming |
| 137 | + |
| 138 | +Turftopic now allows you to automatically assign human readable names to topics using LLMs or n-gram retrieval! |
| 139 | + |
| 140 | +```python |
| 141 | +from turftopic import KeyNMF |
| 142 | +from turftopic.namers import OpenAITopicNamer |
| 143 | + |
| 144 | +model = KeyNMF(10).fit(corpus) |
| 145 | + |
| 146 | +namer = OpenAITopicNamer("gpt-4o-mini") |
| 147 | +model.rename_topics(namer) |
| 148 | +model.print_topics() |
| 149 | +``` |
| 150 | + |
| 151 | +| Topic ID | Topic Name | Highest Ranking | |
| 152 | +| - | - | - | |
| 153 | +| 0 | Operating Systems and Software | windows, dos, os, ms, microsoft, unix, nt, memory, program, apps | |
| 154 | +| 1 | Atheism and Belief Systems | atheism, atheist, atheists, belief, religion, religious, theists, beliefs, believe, faith | |
| 155 | +| 2 | Computer Architecture and Performance | motherboard, ram, memory, cpu, bios, isa, speed, 486, bus, performance | |
| 156 | +| 3 | Storage Technologies | disk, drive, scsi, drives, disks, floppy, ide, dos, controller, boot | |
| 157 | +| | ... | |
| 158 | + |
146 | 159 | ### Visualization |
147 | 160 |
|
148 | 161 | Turftopic does not come with built-in visualization utilities, [topicwizard](https://github.com/x-tabdeveloping/topicwizard), an interactive topic model visualization library, is compatible with all models from Turftopic. |
|
0 commit comments