Automatically annotates a tweet with hashtag, if the tweet is similar to other tweets annotated with the same hashtags.
The pipeline in short is download data > train models > annotate tweet.
python download.py
to stream and download tweets intotweets.txt
andhashtags.txt
python train.py
to train the neural network. It will save the data models and neural network model intotweet_model.pkl
,hashtag_model.pkl
,model.h5
python tag.py --tweet "TWEET CONTENT"
will annotate a tweet using pretrained models
This repository reimplements some of the code I used for my Master thesis Character-level Convolutional Neural Networks with Gated Recurrent Unit for Twitter Hashtag Prediction (2017).
For more information, feel free to contact me, my username
@gmail.com