Skip to content

Real-time topic detection on Twitter documents using Apache Storm and the Latent Dirichlet Allocation (LDA)

Notifications You must be signed in to change notification settings

siwS/online-lda-storm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Storm Trident topology for Online LDA Algorithm

@author: Sofia Tzima

Description

This project is part of my thesis during my postgraduate studies at National Technical University of Athens.

The purpose of this project was to implement real-time topic detection on Twitter documents using Apache Storm and the Latent Dirichlet Allocation (LDA) algorithm.

Technologies

This project uses Apache Storm to do real-time processing of input data. Input is polled by Twitter public stream API. Specifically, it uses the Trident abstraction of Storm that allows to do elegant stream processing, state manipulation and low latency querying. Redis Server is used for persisting the state.

LDA Algorithm

In order to do real-time processing, I used the Online version of the LDA Algorithm. Typical LDA Algorithm processes the documents iteratively in batches. The Online LDA algorithm only processes each document once, making it suitable for real-time processing.

I used the library JOLDA for executing the algorithm.

Run locally

The project is built using Apache Maven so you can just download and execute with maven. It depends on the JOLDA library, so you have to check it out and build it with Maven as well. You have to install redis server locally, i.e. run sudo apt-get install redis-server for the topology to run. Finally you have to configure the necessary properties in config file.

Run on a Storm cluster

In order to run on a cluster, you will need to setup a Storm cluster. You also need to set up a Redis server and configure the necessary properties in config file. To submit the topology you should run storm jar filename.jar mainClass topologyName in Nimbus machine.

Topology

This Storm Trident topology:

  • is feeded with data from public Twitter stream using TwitterSampleSpout in batches
  • pre-processes the input data (stemming, removing stop words)
  • joins the tweets in a big list of tweets
  • applies the Online LDA algorithm in each batch

My whole thesis is here. Unfortunately it is written in Greek :P

About

Real-time topic detection on Twitter documents using Apache Storm and the Latent Dirichlet Allocation (LDA)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages