Skip to content

Commit cfad39e

Browse files
authored
Merge pull request #120 from AnFreTh/main
version 0.3.0
2 parents 485e172 + 8d1f40f commit cfad39e

40 files changed

+2775
-449
lines changed

.gitignore

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ share/python-wheels/
2525
.installed.cfg
2626
*.egg
2727
MANIFEST
28-
28+
lightning_logs/
29+
stream_topic_data/
2930
# PyInstaller
3031
# Usually these files are written by a python script from a template
3132
# before PyInstaller builds the exe, so as to inject date/other infos into it.
@@ -77,7 +78,7 @@ target/
7778

7879
# Jupyter Notebook
7980
.ipynb_checkpoints
80-
81+
.ipynb
8182
# IPython
8283
profile_default/
8384
ipython_config.py
@@ -166,7 +167,8 @@ docs/_build/*
166167
examples/lightning_logs/
167168
*.ckpt
168169
# *.yaml
169-
170+
STREAM/lightning_logs/
171+
/STREAM/lightning_logs/
170172
# Additional files and directories to ignore
171173
__pycache__/
172174
*.pyc
@@ -190,4 +192,26 @@ docs/notebooks/data/*
190192
docs/notebooks/embeddings
191193
docs/notebooks/embeddings/*
192194
docs/notebooks/checkpoints
193-
docs/notebooks/checkpoints/*
195+
docs/notebooks/checkpoints/*
196+
embeddings
197+
embeddings/*
198+
.ipynb_checkpoints/
199+
.ipynb_checkpoints/*
200+
stream_topic.egg-info/
201+
stream_topic.egg-info/*
202+
stream_topic/stream_topic_data/*
203+
checkpoints/
204+
lightning_logs/
205+
test1.py
206+
exp_lda.py
207+
exp_nmf.py
208+
Chinese_test.ipynb
209+
get_metric.ipynb
210+
metrics.ipynb
211+
NPMI_PMI.ipynb
212+
run_parallel.ipynb
213+
Untitled.ipynb
214+
run_exp.ipynb
215+
Untitled1.ipynb
216+
run_exp2.ipynb
217+
result/

README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
- [🔍 Hyperparameter optimization](#-hyperparameter-optimization)
4343
- [🖼️ Visualization](#️-visualization)
4444
- [📈 Downstream Tasks](#-downstream-tasks)
45+
- [🧪 Experimental 🧪](#-experimental-)
4546
- [🤝 Contributing and Testing New Models](#-contributing-and-testing-new-models)
4647
- [📜 Citation](#-citation)
4748
- [📝 License](#-license)
@@ -126,6 +127,11 @@ You can install STREAM directly from PyPI or from the GitHub repository:
126127
pip install stream-topic[dcte]
127128
```
128129
130+
For the experimental features:
131+
```bash
132+
pip install stream-topic[experimental]
133+
```
134+
129135
# 📦 Available Models
130136
STREAM offers a variety of neural as well as non-neural topic models and we are always trying to incorporate more and new models. If you wish to incorporate your own model, or want another model incorporated please raise an issue with the required information. Currently, the following models are implemented:
131137
@@ -482,7 +488,46 @@ from stream_topic.visuals import plot_downstream_model
482488
plot_downstream_model(downstream_model)
483489
```
484490
491+
# 🧪 Experimental 🧪
492+
stream-topic.experimental includes several experimental topic representations as well as new stuff we want to try out.
493+
494+
This includes, e.g. topic summarization:
495+
496+
```python
497+
from stream_topic.experimental import stopic_summaries
498+
499+
summaries = topic_summaries(topics, openai_key)
500+
for summary in summaries:
501+
print(f"{summary} \n")
502+
503+
```
504+
505+
But also the possibility to generate a story from the created topics:
506+
507+
```python
508+
from stream_topic.experimental import story_topic
509+
510+
story = story_topic(topics[1], openai_key)
511+
print(story)
512+
513+
```
514+
515+
Lastly, it offers the possibility to visualize your topic in a way, a movie poster could be designed:
516+
517+
```python
518+
from stream_topic.experimental import movie_poster
519+
520+
topic = ["tiger", "lion", "cougar", "cat", "hippo", "chair", "apple", "meat", "poachers", "hyeena"]
521+
522+
movie_poster(topic, openai_key, return_style="plot")
523+
524+
```
525+
This is just one of many possible visualization, but we found that to be rather coherent in terms of truly visualizing the created topics.
526+
Feel free to contribute or rais issues fo further experimental ideas.
485527
528+
<p align="center">
529+
<img src="assets/movie_poster_topic1.png" alt="Figure Description" width="600"/>
530+
</p>
486531
487532
## 🤝 Contributing and Testing New Models
488533

0 commit comments

Comments
 (0)