Giter VIP home page Giter VIP logo

twitterldatopicmodeling's Introduction

Description

Twitter users often associate and socialize with other users based on similar interests. The Tweets of these users can be classified using a trained LDA model to automate the discovery of their similarities.

Prerequisites

To use Python 3, the beta version of the Pattern library must be manually installed using:

pip3 install git+git://github.com/pattern3/pattern.git

Otherwise, Python 2.7 can be used since Pattern package is not currently compatible with Python > 2.7.

If you manually install Pattern3 you should remove the pattern library from the requirements.txt file before installing.

Installing

Download:

git clone https://github.com/kenneth-orton/twitter_LDA_topic_modeling.git

Run linux_setup.sh:

./linux_setup.sh

Install Python packages using pip (or use an environment like a normal person):

pip install -r requirements.txt

Process

  1. Get user and follower ids by location - twitter_user_grabber.py
  2. Download Tweets for each user - get_community_tweets.py
  3. Create an LDA model from a corpus of documents - create_LDA_model.py
  4. Generate topic probability distributions for Tweet documents - tweets_on_LDA.py
  5. Calculate distances between Tweet documents and graph them - plot_distances.py

Sample Visualizations

Built With

  • Gensim - Package for creating LDA model
  • pyLDAvis - Package for visualizing LDA model
  • Tweepy - Package for interacting with Twitter REST API
  • NLTK - Package for stopword management and tokenization

twitterldatopicmodeling's People

Contributors

kethort avatar umutcanbolat avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.