- Python IDE
- Clone code by clinking on the download button
- Open the project folder with your choice of python IDE.
- Execute below comment to install required python packages.
pip install -r requirements.txt
- "GoogleNews-vectors-negative300.bin" online as word-embedding. https://drive.google.com/file/d/0B7XkCwpI5KDYNlNUTTlSS21pQmM/edit
- Twitter API: https://developer.twitter.com/en
-
Run "total_classification.py" with the csv data with the input column "tweet_text" and "category_id", where "tweet_text" is the tweet content will be trained and "category_id" is the category each tweets is labeled.
-
Line 93 "model.add(Dense(8))" is how many categories does the labeling have, change the input value accordingly.
-
Run the "total_classification.py" with the data will output a directory called "model_save", which will have three components of the model.
-
Run "model_prediction.py" to use the model saved in "model_save" directory, which will output the predication of tweeter content.
a. Create a directory named 'data' to hold the input csv file. b. Create a directory named 'result' to save the output csv file.