Skip to content

EntiTweet is a Flask web app aimed at creating visualizations of Twitter co-ocurrence networks with named entities

License

Notifications You must be signed in to change notification settings

sumeetk321/EntiTweet

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn


EntiTweet

A web app for creating Twitter co-occurence networks using Spacy and Flair
Try it out! NOTE: Due to changes in the Twitter API, the app is not functioning as intended. I am working to fix this.

EntiTweet

EntiTweet is a Flask web app aimed at creating visualizations of Twitter "co-ocurrence networks" with named entities. It collects the most recent tweets related to a user-inputted search query, and utilizes the user's choice of SpaCy or Flair to perform Named Entity Recognition (NER) on each tweet. These entities are collected and added as nodes to a graph using the NetworkX package. Edges are then added to the graph; two nodes are connected by an edge if they co-ocurr. The criteria for co-ocurrence is that both entities must be present in the same tweet. The graph is then rendered using the PyVis package.

Please visit the app page and try it for yourself! Note that the live version on render.com doesn't include the Flair functionality, as the hosting site didn't have enough memory for the Flair model.

Running the App Locally

First, clone the repository.

git clone https://github.com/sumeetk321/EntiTweet.git

Use the package manager pip to install the required dependencies. These are outlined in requirements.txt. Simply run app.py or run the following command to start the server, ensuring you have Flask installed:

flask run

Most likely you'll have to visit 127.0.0.1:5000 on your browser to access the server. Happy network analyzing!

Usage

On the website, simply enter the search query, the number of tweets you'd like to use to create the network. Let's input Stephen Curry as our Twitter query, and let's use the last 30 tweets with this query to generate the network:

After pressing Submit, here is our result:

Enjoy!

Contributing

I welcome pull requests!

License

Distributed under the MIT License. See LICENSE.txt for more information.

Contact

Sumeet Kulkarni - [email protected]

Project Link: https://github.com/sumeetk321/EntiTweet

About

EntiTweet is a Flask web app aimed at creating visualizations of Twitter co-ocurrence networks with named entities

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages