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
File details
Details for the file taranis_story_clustering-0.4.4.tar.gz
.
File metadata
- Download URL: taranis_story_clustering-0.4.4.tar.gz
- Upload date:
- Size: 41.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1e2fa2ec0c4683eca1d42c02db130965ebdd2be973ab78a135dcfb6128cf3cd |
|
MD5 | e4ed4baa802841a980c545d20b0f8620 |
|
BLAKE2b-256 | 6509f563ce62f0f0eeed2c75e48e77a6a882bad6ad7f70b80f655946147fd05b |
File details
Details for the file taranis_story_clustering-0.4.4-py3-none-any.whl
.
File metadata
- Download URL: taranis_story_clustering-0.4.4-py3-none-any.whl
- Upload date:
- Size: 31.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 286fb3e41b58b42540525b2b51ebb2317d4faf6f1636b8a65704aeefeb4c6bed |
|
MD5 | c660d55abc85a831e5ce7bca3480a788 |
|
BLAKE2b-256 | 6e01b82dc4d4e05a770591754781c43bcebfbc565792dfeff263c406e80b7b56 |