Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fifikobayashi/Sentiona

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

18 Commits

Repository files navigation

Sentiona (Beta)

Sentiment Analytics Framework

My first cut of a python-based Sentiment Analytics framework that canvases cryptotwitter sentiments towards a particular project/personality.

It runs on live twitter data via the Twitter API and uses an existing machine learning dataset to train the sentiment analysis model.

This concept isn't new but it obviously would need a lot more training to be aware of nuances on cryptotwitter.

I've also set the retrieval to time out after 150 seconds to avoid spamming the twitter API.

screenshot

Setup:

  1. Apply to Twitter to become a Twitter Developer https://developer.twitter.com/content/developer-twitter/en.html

  2. Extract the API key, API secret key, Access token and Access token secret from your developer app page https://developer.twitter.com/en/apps and update the following initialization parameters

#connection to twitter API
consumer_api_key = 'USE_YOUR_OWN'
consumer_api_secret = 'USE_YOUR_OWN' 
access_token = 'USE_YOUR_OWN'
access_token_secret ='USE_YOUR_OWN'
  1. Clone this repo
git clone https://github.com/fifikobayashi/Sentiona
cd Sentiona
  1. install dependencies
pip3 install numpy
pip3 install pandas
pip3 install matplotlib
pip3 install seaborn
pip3 install nltk
pip3 install sklearn
  1. update the dataset to be loaded in the code "tweets = pd.read_csv()" to point to your trained ML models
# load twitter dataset
tweets = pd.read_csv("https://....
  1. To execute, just run
python3 Sentiona.py

Notes on dependencies:

Built upon techniques and samples from the following projects/articles:

https://towardsdatascience.com/creating-the-twitter-sentiment-analysis-program-in-python-with-naive-bayes-classification-672e5589a7ed

https://github.com/g3n1uss/generating-reviews-discovering-sentiment

https://python.gotrained.com/scraping-tweets-sentiment-analysis/

About

Sentiment Analytics Framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

AltStyle によって変換されたページ (->オリジナル) /