Story Clustering Bot for Taranis-NG
Project description
Story Clustering
This code takes newsitems in the format as provided by Taranis-NG and clusters them into Stories.
Description and Use
The approach supports the following functionalities:
- Automatically detect Events.
- News items are clustered based on the detected Events.
- Documents belonging to related Events are then clustered into Stories.
Initial clustering
The method initial_clustering
in clustering.py
takes as input a dictionary of news_items_aggregate
(see tests/testdapa.py
for the actual input format) and outputs a dictionary containing two keys:
("event_clusters" : list of list of documents ids) and
("story_clusters" : list of list of documents ids)
Incremental clustering
The method incremental_clustering_v2
takes as input a dictionary of news_items_aggregate
, containing new news items to be clustered, and clustered_news_items_aggregate
, containing already clustered items, and tries to cluster the new documents to the existing clusters or create new ones. See tests/testdata.py
for the actual input formats. This method also
outputs a dictionary containing two keys:
("event_clusters" : list of list of documents ids) and
("story_clusters" : list of list of documents ids)
Installation
The requirements.txt
file should list all Python libraries that the story-clustering
depends on, and they will be installed using:
pip install .
Development
pip install .[dev]
Use
See notebook\test_story_clustering.ipynb
for examples on how to use the clustering methods.
License
EUROPEAN UNION PUBLIC LICENCE v. 1.2
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for taranis_story_clustering-0.7.7.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc2bb9f46811685c9cfcb60d2e1362c5eb7f9777084f976f50e8e20f2a92df5a |
|
MD5 | d6e98d4f6ceaf04e8ad21666cb138326 |
|
BLAKE2b-256 | 6fdd840ff32369e93fd54565d9c8052b900bdc5b39b3b6292a36b71decfb005c |
Hashes for taranis_story_clustering-0.7.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2a30eb504952e4a400b1fcee34241541fe502efc28e597de47976678eee5b33 |
|
MD5 | e3b20fd471c7697e9770b648c02c1964 |
|
BLAKE2b-256 | 14775e05c0978603b66b0c0c02e64426d50fcca1d98942c94287ecca59c2e2c3 |