项目作者: HHansi

项目描述 :
Python implementation of Embed2Detect for event detection in social media
高级语言: Jupyter Notebook
项目地址: git://github.com/HHansi/Embed2Detect.git
创建时间: 2020-03-16T22:24:14Z
项目社区:https://github.com/HHansi/Embed2Detect

开源协议:

下载


Embed2Detect

Embed2Detect is an event detection mechanism developed for social media data. Please refer to the paper Embed2Detect: Temporally Clustered Embedded Words for Event Detection in Social Media for more details about this approach.

If you use this system, please consider citing this paper and reference details are given below.

About

Python 3.7 implementation of Embed2Detect

Used packages are listed in requirements.txt

Event detection

run main.py given the parameters;

  • data_file_path - path to input file
  • fromtime, to_time - parameters to define time period for event detection formatted as %Y%m%d%H%M%S (e.g. 2019_10_20_15_28_00)
    (Using the time period, data in the input file can be filtered timely)
  • window_legth - length for time window in minutes
  • alpha - value for parameter alpha
  • beta - value for parameter beta

Input file format

.tsv file formatted as follows;

  • should contain a post (e.g. tweet) per line
  • should contain 3 compulsory columns with headers; id, timestamp and text (any other column is ignored)
  • timestamp should be formatted as %Y-%m-%d %H:%M:%S (e.g. 2019-10-20 15:25:00)
  • empty cells should be indicated using ‘_na_‘

Output format

Completed event detection saves a folder with given input file name in the results_folder_path mentioned under project_config.
This folder contains .txt files where events words are saved as single word per line corresponding to each event window.

Data cleaning

Depending on the target data set, data cleaning techniques can be customised. The default flow which
was developed by targeting a Twitter data set is available under the method; preprocessing_flow in
data_preprocessor.py.

Project configurations

General configuration details of the project including word embedding configs, performance configs and file path configs
are available in project_config.py.

  • preprocess -: preprocessing methods to use (provide as a list of method names)

    currently supported preprocessing methods - ‘rm-punct’: remove punctuation, ‘rm-stop_words’: remove stop words

    default - [‘rm-punct’, ‘rm-stop_words’]
  • aggregation_method -: aggregation method to use

    currently supported preprocessing methods - ‘max’: maximum calculation, ‘avg’: average calculation

    default - ‘max’

Reference

  1. @article{hettiarachchi2021embed2detect,
  2. title={{E}mbed2{D}etect: temporally clustered embedded words for event detection in social media},
  3. author={Hettiarachchi, Hansi and Adedoyin-Olowe, Mariam and Bhogal, Jagdev and Gaber, Mohamed Medhat},
  4. journal={Machine Learning},
  5. volume={111},
  6. pages={49--87},
  7. year={2022},
  8. publisher={Springer},
  9. doi = {10.1007/s10994-021-05988-7},
  10. url = "https://doi.org/10.1007/s10994-021-05988-7",
  11. }