There is an in-depth look at the terms and structure of this project on Medium.
If you have the compulsive urge to check social media apps throughout the day and miss most of what happens outside your device screen in process, you might suffer from what science call "Fear-of-missing-out"
Some people, myself included, see a trending topic and really hate being forced to scroll endlessly through Twitter to try to figure out what is that all about.
But hey, we are in 2019, we can train our machine to extract the relevant information of us, and do it fast!
In this project, we classify people's tweets by estimating their opinions/polarities, we try to distinguish the most relevant terms between thousands of words, and finally, generate a conclusion of what the general opinion is.
example output for Brexit search termPython 3.7.1 and pip 19.0.3 were used in the development of this project, any Python 3.x version should work just fine.
- Python
- Python pip:
sudo apt-get install python-pip
(Linux Debian family) - Java 6.0 or newer (required for Language_check lib)
You can run ML-Fomo directly on AWS SageMaker using this Jupyter Notebook
Make sure your environment meets the rerequisites.
- clone/download this repo to your workspace
[email protected]:tahaHichri/ML-fomo.git
- Go ahead and run the install script and wait for all the dependencies to be downloaded.
python install/install.py
- Let's fetch the models
python -m textblob.download_corpora lite
Once you get everything nice and ready, the only thing that remains is to set your twitter dev keys.
That will allow your app to communicate with the Twitter API.
There are 4 placeholders on line 62, 63, 64, and 65 in main.py file.
# TODO insert your Twitter API keys here
# Create a developer account and request access
# @link{ https://developer.twitter.com/en/apply-for-access.html}
consumer_key = '<consumer_key>'
consumer_secret = '<consumer_secret>'
access_token = '<access_token>'
access_token_secret = '<access_token_secret>'
Command pattern: python main.py <term> <limit>
Example call:
python main.py 'Metallica' 100
Argument | Required | Type |
---|---|---|
query | YES | string |
limit | NO (default 500) | int |
These are the know limitations that I will be trying to overcome as the project progresses.
- This is the initial version (pre-alpha) contributions/feedback are welcome.
- For now, non-english tweets are not taken into consideration for dictionary (most frequently used words) generation, nor overall description, however, they are part of the initial polarity classification.
This software is GPL licensed. The work based off of it must be released as open source.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.