Sentiment Analysis in Turkish tweets is implemented with 3 different feature extraction techniques and simple multilayer perceptron(MLP). These feature extraction techniques are:
- Handcrafted Feature Extraction with SentiTurkNet
- Turkish Word2Vec
- BERTurk
For more NLP content like this, please subscribe to my blog: https://akoksal.com/
And check out this post for detailed explanation and better models with Keras: https://akoksal.com/articles/understand-tweets-better-with-BERT-sentiment-analysis
Due to license problems in Twitter datasets, I had to remove BOUN Twitter Data and collected tweets with TweetScraper. I can share only Tweet IDs for BOUN Twitter Data. Download
I also shared dummy json data for BOUN Twitter Data and TweetScraper data in this repo to show the required data format. Please, DO NOT train your model and analyze with this data as it would fail.
Notebooks are self-explanatory. You can check out PyIstanbul Notebooks folder for 3 different feature extraction techniques.
BERT Features with Keras notebook has custom loss, Dropout, and more controllable features with Keras which result better scores with 68% macro averaged recall.
Models | Positive Recall | Neutral Recall | Negative Recall | Average Recall(Macro) |
---|---|---|---|---|
SentiTurkNet | 0.04 | 0.94 | 0.09 | 0.36 |
Word2Vec | 0.37 | 0.69 | 0.47 | 0.51 |
BERT | 0.53 | 0.76 | 0.67 | 0.65 |
Also, 3 different topics with big incidents are analyzed and the correlation between incidents and Twitter sentiments is seen by BERT model.
Protests in Twitter after new Turkish series in Netflix with LGBT content.
Tweet
Scores
Two different incidents in Twitter about Cappy for unidentified objects in juice.
Tweet 1
Tweet 2
Scores
Some major critics about Berkcan Guven in Twitter after he released a video with underage celebrity. He removed the video after 7 hours which already had more than 700k views.
Video
Scores