Auto-hashtag Service can actively analyze usersβ messy input, learn the connection between content and hashtags, and recommend hashtags by understanding the content. Whatβs more, we use different models for the analysis of different media formats in one twitter and combine the results together using weights, so the system is flexible by modifying the weights when coping with various types of twitter, like sharing a funny picture or make text comments. For more details, see the full document
1. Crawl tweets given multiple hashtags
You should apply for Twitter API and fill the content
consumer_key = ''
consumer_secret = ''
access_token = ''
access_token_secret = ''
In the expression part, multiple hashtags are used to crawl tweets
expression = "#friends OR #pets OR #tuesdaymotivation OR #funny OR #contest OR #giveaway OR #ootd OR #win OR #merrychristmas OR #competition OR #fridayfeeling OR #traveltuesday OR #happybirthday OR #wcw OR #goals OR #fitness OR #vegan OR #movies OR #running OR #thankful OR #science OR #blessed OR #influencer OR #metoo"
In this part, you should specify
textclassifier = TextClassifier(
'/content/multi-label-classification', 'dictionary.txt', 'hashtag.txt', 'input.train.text.csv')
the first parameter is working directory, the fourth is crawl data. multi-label-classification gives the example of dictionary.txt and hashtag.txt
3. Train the model and make prediction
To make a demo, I download my crawled data by
git clone https://github.com/NavePnow/multi-label-classification.git
you can make your own dataset and train your own model.
All necessary parts are discussed at Document, so you just download the image model and code from Internet. This content is contributed by XiaoSanGit.
clone and repo auto-hashtag and modify the model path in
auto-hashtag/classify/views.py
then run Django on your server
cd auto-hashtag
python3 manage.py runserver 8000
π€ Evan - Text Analyzer
π€ XiaoSanGit - Image Analyzer
- Github: @XiaoSanGit
Contributions, issues and feature requests are welcome! Feel free to check issues page.
Give a βοΈ if this project helped you!
PayPal | Patron |
---|---|
- Twitter_Dictionary_Guide.asp
- op-twitter-abbreviations-you-need-know
- top-50-twitter-acronyms-abbreviations-and-initialisms
- twitter-dictionary-35-twitter-abbreviations
- Train and Deploy the Mighty BERT based NLP models using FastBert and Amazon SageMaker
- fast-bert-github
- Advisor: Professor Chua Tat Seng