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 incremental clustering method 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.4.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 847d8607d8fb6b0d077f736f01805a15d3ae30538d8305bd562ef9c1f479afa1 |
|
MD5 | 637112f4a6f97d29bec151c0b092d7e6 |
|
BLAKE2b-256 | fe010ee28fae085e806b451f51a395c0323aca6d7fc70968c7a50a30175584cf |
Hashes for taranis_story_clustering-0.4.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a47dbb58cf9177942ab529316ea2348aedc1908d73ade0f5a1dff2747de82bd |
|
MD5 | 2890d9553ddf23c68dc13cb93b0b816e |
|
BLAKE2b-256 | 22f8162ca17ecf7db4bc8a81dce4136301178583811985b779e68e3e473516db |