Django Twitter Analysis Project
Project Description: Creating a platform for performing Sentiment Analysis on Tweets found via mentions on Twitter. Our website will ask for an input of the mention (@) for creating the analysis and then it will show the latest tweets that fall under that mention and show the sentiment analysis of the same. Tech Stack Used: TextBlob: TextBlob is a Python (2 and 3) library for processing textual data. It provides a simple API for diving into common natural language processing (NLP) tasks such as part-of-speech tagging, noun phrase extraction, sentiment analysis, classification, translation, and more. NLTK: The Natural Language Toolkit, or more commonly NLTK, is a suite of libraries and programs for symbolic and statistical natural language processing for English written in the Python programming language. Tweepy: Tweepy is a Python library for accessing the Twitter API. It is great for simple automation and creating Twitter bots. Working of the Project: We identify the tweets using libraries like tweepy. We create our personal Twitter Developer Account to gain access to fetching tweets and using them for the project and generate the API that we further use in our .py files and code to gain access to the tweets on Twiiter.com We further bifurcate the tones of any tweet using the NLTK libraries and in-built function of TextBlob libraries into Positive, Neutral, and Negative Sentiment. Using the functionalities of Django, we render the templates and create functions and views to display the results of our backend model of NLP. Project functionality: The project takes input from the user in the form of a string via the index.html page with the help of the form. The string is then stored in the form of an input to the form and is then received to the views.py file via the POST method present in the frontend Html. The views.py file then transfers the search item to the SentimentAnalysis_twitter.py Then, SentimentAnalysis_twitter.py extracts tweets from the public tweets on Twitter and classifies them with the help of the Textblob library The TextBlob library has the function which calculates the sentiment polarity and helps us determine the overall sentiment of the tweet on the basis of the threshold values Based on the polarity, the tweets are then categorized as positive or negative, or neutral The tweets are then displayed to the user via the search-results.html page A download button, when triggered by the client, downloads the results into a CSV file on their Personal Computer. Note: In case if no results are found in the public tweets database of Twitter, the application doesn’t return any tweets and simply displays the overall sentiment as neutral. Created by: Avi Mehta Dhruv Pathak Divyank Jain
Download
1 formatsVideo Formats
Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.