This is a python implementation according to CS-BTM: a semantics-based hot topic detection method for social network.
The code structure is based on a python BTM implement.
-
Transformers
pip install transformers==4.18.0 --ignore-installed PyYAML
-
TensorFlow:
- CPU:
pip install tensorflow==2.3.0
- GPU:
pip install tensorflow-gpu==2.3.0
- CPU:
-
Run with default config and test data
- Topic Learning, Topic Inference and Model Evaluation will be performed.
python src/evaluate.py
- Topic Learning, Topic Inference and Model Evaluation will be performed.
-
Edit configs in
src/evaluate.py
To consider the relationship between different two bitems, such as context semantics, polysemy, and similarity, incorporate Bert with BTM